Core - Add IRequest.PostData setter

can be used with the new PostData public class

request.PostData = new PostData();
This commit is contained in:
amaitland
2019-11-23 15:21:18 +10:00
parent ec8d58bcec
commit 6af44d7777
5 changed files with 21 additions and 3 deletions
+9
View File
@@ -175,5 +175,14 @@ namespace CefSharp
throw gcnew Exception(gcnew String(L"This IPostDataWrapper is readonly and cannot be modified."));
}
}
operator CefRefPtr<CefPostData>()
{
if (this == nullptr)
{
return NULL;
}
return _postData.get();
}
};
}
+9
View File
@@ -168,6 +168,15 @@ namespace CefSharp
return _postData;
}
void Request::PostData::set(IPostData^ postData)
{
ThrowIfDisposed();
ThrowIfReadOnly();
_request->SetPostData((CefSharp::PostData^)postData);
}
bool Request::IsReadOnly::get()
{
ThrowIfDisposed();
+1 -1
View File
@@ -53,7 +53,7 @@ namespace CefSharp
virtual property ReferrerPolicy ReferrerPolicy { CefSharp::ReferrerPolicy get(); }
virtual property NameValueCollection^ Headers { NameValueCollection^ get(); void set(NameValueCollection^ url); }
virtual property TransitionType TransitionType { CefSharp::TransitionType get(); }
virtual property IPostData^ PostData { IPostData^ get(); }
virtual property IPostData^ PostData { IPostData^ get(); void set(IPostData^ postData); }
virtual property bool IsReadOnly { bool get(); }
virtual void InitializePostData();
+1 -1
View File
@@ -49,7 +49,7 @@ namespace CefSharp
/// <summary>
/// Create a new <see cref="IPostDataElement"/> instance
/// </summary>
/// <returns></returns>
/// <returns>PostDataElement</returns>
IPostDataElement CreatePostDataElement();
/// <summary>
+1 -1
View File
@@ -86,7 +86,7 @@ namespace CefSharp
/// <summary>
/// Post data
/// </summary>
IPostData PostData { get; }
IPostData PostData { get; set; }
/// <summary>
/// Get the transition type for this request.