Class ScopeRegistry
Representation of "scopeRegistries" entry of the manifest file.
Inheritance
Inherited Members
Namespace: StansAssets.Foundation.Editor
Assembly: cs.temp.dll.dll
Syntax
public class ScopeRegistry
Constructors
ScopeRegistry(Dictionary<String, Object>)
Initializes a new instance of ScopeRegistry class with the provided data.
Declaration
public ScopeRegistry(Dictionary<string, object> dictionary)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<System.String, System.Object> | dictionary | Data to fill this object. Must contain name, url and scopes. |
ScopeRegistry(String, String, IEnumerable<String>)
Initializes a new instance of ScopeRegistry class with the provided properties.
Declaration
public ScopeRegistry(string name, string url, IEnumerable<string> scopes)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of new scope registry. |
System.String | url | Url of new scope registry. |
IEnumerable<System.String> | scopes | Scopes of new scope registry. |
Properties
Name
Registry name.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Scopes
Registry scopes.
Declaration
public IEnumerable<string> Scopes { get; }
Property Value
Type | Description |
---|---|
IEnumerable<System.String> |
Url
Registry url.
Declaration
public string Url { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
AddScope(String)
Adds scope.
Declaration
public void AddScope(string scope)
Parameters
Type | Name | Description |
---|---|---|
System.String | scope | A scope to add. |
Equals(Object)
Method for matching entries, Name matching is not necessary.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | Object to compare with. |
Returns
Type | Description |
---|---|
System.Boolean | 'true' if url and scopes match, 'false' otherwise. |
Overrides
GetHashCode()
Generates a hash of this object data, excluding Name.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | Hash of this object. |
Overrides
HasScope(String)
Returns true if provided scope exists in current scope registry.
Declaration
public bool HasScope(string scope)
Parameters
Type | Name | Description |
---|---|---|
System.String | scope | string scope to check if exists in this scope registry. |
Returns
Type | Description |
---|---|
System.Boolean | 'true' if this ScopeRegistry contains scope, |
ToDictionary()
Creates dictionary from this object.
Declaration
public Dictionary<string, object> ToDictionary()
Returns
Type | Description |
---|---|
Dictionary<System.String, System.Object> | ScopeRegistry object representation as Dictionary<string, object>. |