AuthenticationProviderExtensionsLoadIcon Method

Loads an icon from embedded resources associated with the authentication provider.

Definition

Namespace: Gemstone.Security.AuthenticationProviders
Assembly: Gemstone.Security (in Gemstone.Security.dll) Version: 1.0.169 -- Release Build+43e28b5fd7125e5e0921cb1e975c038b7a974af2
public static (string MediaType, Stream Data)? LoadIcon(
	this IAuthenticationProvider provider
)

Parameters

provider  IAuthenticationProvider
The provider which is visually represented by the icon

Return Value

NullableValueTupleString, Stream
The icon associated with the provider.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IAuthenticationProvider. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

Supported file types are jpg, png, gif, svg, and webp.

For a hypothetical ExampleProvider in the Gemstone.Example namespace, the embedded resource name for a jpg icon would be Gemstone.Example.ExampleProvider.jpg.

Expect that icons will be rendered in an approximately square space, 32 pixels tall. Therefore, a good target size would be 32x32, but it can be a bit wider or narrower.

See Also