Files
cefsharp/CefSharp.Core/PostDataElement.cs
T
Alex Maitland 2b4a8cb18e Core - PublicApi remove references to CefSharp.Core.Runtime
- Add an UnWrap method to the interfaces (should be hidden from IntelliSense)
- For .Net 4.5.2 projects they're  not a decorator class which an inner instance of the CefSharp.Core.Runtime Type
- For Net Core we have a ref assembly which allows us to reference the CefSharp.Core.Runtime without issues
  We can potentially remove the ref assembly now and forgo any direct reference.
2021-01-13 16:51:30 +10:00

76 lines
2.2 KiB
C#

// Copyright © 2020 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
//NOTE:Classes in the CefSharp.Core namespace have been hidden from intellisnse so users don't use them directly
namespace CefSharp
{
/// <summary>
/// Class used to represent a single element in the request post data.
/// The methods of this class may be called on any thread.
/// </summary>
public class PostDataElement : IPostDataElement
{
internal CefSharp.Core.PostDataElement postDataElement = new CefSharp.Core.PostDataElement();
/// <inheritdoc/>
public string File
{
get { return postDataElement.File; }
set { postDataElement.File = value; }
}
/// <inheritdoc/>
public bool IsReadOnly
{
get { return postDataElement.IsReadOnly; }
}
/// <inheritdoc/>
public PostDataElementType Type
{
get { return postDataElement.Type; }
}
/// <inheritdoc/>
public byte[] Bytes
{
get { return postDataElement.Bytes; }
set { postDataElement.Bytes = value; }
}
/// <inheritdoc/>
public void Dispose()
{
postDataElement.Dispose();
}
/// <inheritdoc/>
public void SetToEmpty()
{
postDataElement.SetToEmpty();
}
/// <summary>
/// Used internally to get the underlying <see cref="IPostDataElement"/> instance.
/// Unlikely you'll use this yourself.
/// </summary>
/// <returns>the inner most instance</returns>
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public IPostDataElement UnWrap()
{
return postDataElement;
}
/// <summary>
/// Create a new instance of <see cref="IPostDataElement"/>
/// </summary>
/// <returns>PostDataElement</returns>
public static IPostDataElement Create()
{
return new CefSharp.Core.PostDataElement();
}
}
}