Skip to content

Commit

Permalink
Change selectedAcceptFilter to a ref param as the initial value was b…
Browse files Browse the repository at this point in the history
…eing hidden by using an out param
  • Loading branch information
amaitland committed Jun 9, 2015
1 parent d4630ea commit d20599a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions CefSharp.Example/TempFileDialogHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ namespace CefSharp.Example
{
public class TempFileDialogHandler : IDialogHandler
{
public bool OnFileDialog(IWebBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List<string> acceptFilters, out int selectedAcceptFilter, out List<string> result)
public bool OnFileDialog(IWebBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List<string> acceptFilters, ref int selectedAcceptFilter, out List<string> result)
{
selectedAcceptFilter = 0;
result = new List<string> { Path.GetRandomFileName() };
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion CefSharp/IDialogHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ public interface IDialogHandler
/// <param name="selectedAcceptFilter">is the 0-based index of the filter that should be selected by default.</param>
/// <param name="result">the filename(s) the dialog returns</param>
/// <returns>To display a custom dialog return true. To display the default dialog return false.</returns>
bool OnFileDialog(IWebBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List<string> acceptFilters, out int selectedAcceptFilter, out List<string> result);
bool OnFileDialog(IWebBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List<string> acceptFilters, ref int selectedAcceptFilter, out List<string> result);
}
}

0 comments on commit d20599a

Please sign in to comment.