modified stringutils to accept ienumerable and cookiemanager to use it

This commit is contained in:
David Serfozo
2015-07-30 08:23:22 +02:00
parent f7200064f3
commit 5e2fff4e15
3 changed files with 3 additions and 9 deletions
+1 -7
View File
@@ -66,13 +66,7 @@ namespace CefSharp
{
ThrowIfDisposed();
vector<CefString> schemeVector;
for each(String^ scheme in schemes)
{
schemeVector.push_back(StringUtils::ToNative(scheme));
}
_cookieManager->SetSupportedSchemes(schemeVector, NULL);
_cookieManager->SetSupportedSchemes(StringUtils::ToNative(schemes), NULL);
}
bool CookieManager::VisitAllCookies(ICookieVisitor^ visitor)
+1 -1
View File
@@ -50,7 +50,7 @@ namespace CefSharp
}
[DebuggerStepThrough]
std::vector<CefString> StringUtils::ToNative(List<String^>^ str)
std::vector<CefString> StringUtils::ToNative(IEnumerable<String^>^ str)
{
if (str == nullptr)
{
+1 -1
View File
@@ -50,7 +50,7 @@ namespace CefSharp
/// </summary>
/// <param name="str">The List of strings that should be converted.</param>
/// <returns>An unmanaged representation of the provided List of strings, or an empty List if the input is a nullptr.</returns>
static std::vector<CefString> ToNative(List<String^>^ str);
static std::vector<CefString> ToNative(IEnumerable<String^>^ str);
/// <summary>
/// Assigns the provided cef_string_t object from the given .NET string.