Skip to content

Commit 35fc4b8

Browse files
committed
WIP #51 - Fix options type
Yeah, I can't strongly type this.
1 parent 97ebc5a commit 35fc4b8

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

CSF.Extensions.WebDriver/Factories/WebDriverConfigurationItemParser.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ static Func<DriverOptions> GetOptions(Type optionsType, IConfigurationSection co
170170
};
171171
}
172172

173-
static ICustomizesOptions<DriverOptions> GetOptionsCustomizer(Type optionsType, string customizerTypeName)
173+
static object GetOptionsCustomizer(Type optionsType, string customizerTypeName)
174174
{
175175
if(string.IsNullOrWhiteSpace(customizerTypeName)) return null;
176176
var customizerType = Type.GetType(customizerTypeName, true);
@@ -180,7 +180,7 @@ static ICustomizesOptions<DriverOptions> GetOptionsCustomizer(Type optionsType,
180180
if(customizerType.GetConstructor(Type.EmptyTypes) == null)
181181
throw new ArgumentException($"The specified customizer type must have a public parameterless constructor.", nameof(customizerTypeName));
182182

183-
return (ICustomizesOptions<DriverOptions>) Activator.CreateInstance(customizerType);
183+
return Activator.CreateInstance(customizerType);
184184
}
185185

186186
/// <summary>

CSF.Extensions.WebDriver/Factories/WebDriverCreationOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public class WebDriverCreationOptions
171171
/// will be available to the custom driver factory but the factory is under no obligation to use or respect its value.
172172
/// </para>
173173
/// </remarks>
174-
public ICustomizesOptions<DriverOptions> OptionsCustomizer { get; set; }
174+
public object OptionsCustomizer { get; set; }
175175

176176
/// <summary>
177177
/// Gets or sets the name of a type which is used to construct the WebDriver instance.

0 commit comments

Comments
 (0)