Class RemovableConfigurationExtensions
Provides methods to allow one to configure (or opt out of configuring) Removable Storage devices.
Namespace: Sp.Agent.Configuration
Assembly: Sp.Agent.Removable.dll
Methods
WithRemovableStorageDiscovery(IAgentExternalStorageConfigurationPhase, Func<IEnumerable<String>>)
Specifies a function to be used to sense Removable Storage devices.
Declaration
public static IAgentChallengeConfigurationPhase WithRemovableStorageDiscovery(this IAgentExternalStorageConfigurationPhase that, Func<IEnumerable<string>> discover)
Parameters
Type | Name | Description |
---|---|---|
IAgentExternalStorageConfigurationPhase | that | |
System.Func<System.Collections.Generic.IEnumerable<System.String>> | discover |
Returns
Type | Description |
---|---|
IAgentChallengeConfigurationPhase |
Examples
AgentContext.For( "abc12" )
.Configure( agent => agent
.WithLocalStorage(...) // or DisableLocalBoundStorage()
.WithRemovableStorageDiscovery( () => SearchForRemovables() )
.WithRemovableChallengeHandler( (store, challenge) => HandleChallenge( store, challenge) )
.WithDistributor( distributor => distributor
.WithDiscovery( () => baseUri )
.CompleteWithDefaults()) // or DisableDistributor()
.CompleteWithDefaults() );