Class ResourceFactory
Constructs Resources based on deserialized dictionaries.
Inheritance
System.Object
ResourceFactory
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Okta.Sdk.Internal
Assembly: Okta.Sdk.dll
Syntax
public sealed class ResourceFactory
Constructors
ResourceFactory(IOktaClient, ILogger)
Initializes a new instance of the ResourceFactory class.
Declaration
public ResourceFactory(IOktaClient client, ILogger logger)
Parameters
Type | Name | Description |
---|---|---|
IOktaClient | client | The client. |
Microsoft.Extensions.Logging.ILogger | logger | The logging interface. |
Methods
CreateFromExistingData<T>(IDictionary<String, Object>)
Creates a new Resource from an existing dictionary.
Declaration
public T CreateFromExistingData<T>(IDictionary<string, object> existingDictionary)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | existingDictionary | The existing dictionary. |
Returns
Type | Description |
---|---|
T | The created Resource. |
Type Parameters
Name | Description |
---|---|
T | The Resource type. |
CreateNew<T>(IDictionary<String, Object>)
Creates a new Resource with the specified data.
Declaration
public T CreateNew<T>(IDictionary<string, object> data)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | data | The initial data. |
Returns
Type | Description |
---|---|
T | The created Resource. |
Type Parameters
Name | Description |
---|---|
T | The Resource type. |
NewDictionary(IDictionary<String, Object>)
Creates a new dictionary with the specified behavior.
Declaration
public IDictionary<string, object> NewDictionary(IDictionary<string, object> existingData)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | existingData | The initial dictionary data. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | A new dictionary with the specified behavior. |