Class PropertyGroups
Represents a dictionary of PropertyGroup objects.
Inheritance
Inherited Members
Namespace: iPropertyGroups
Assembly: iPropertyGroups.dll
Syntax
[Serializable]
public class PropertyGroups
Properties
| Improve this Doc View SourceGroups
Main dictionary object that holds the PropertyGroup objects.
Declaration
public Dictionary<string, PropertyGroup> Groups { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, PropertyGroup> |
Item[String]
Returns a Dictionary value for the provided key.
Declaration
public PropertyGroup this[string key] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Name of the PropertyGroup |
Property Value
Type | Description |
---|---|
PropertyGroup | PropertyGroup object |
Methods
| Improve this Doc View SourceAdd(String, PropertyGroup)
Adds the specified key and value to the collection.
Declaration
public void Add(string item, PropertyGroup props)
Parameters
Type | Name | Description |
---|---|---|
System.String | item | Name of the PropertyGroup |
PropertyGroup | props | The PropertyGroup object |
Count()
Gets the number of key/value pairs in the PropertyGroups<string, PropertyGroup> object.
Declaration
public long Count()
Returns
Type | Description |
---|---|
System.Int64 | the number of key/value pairs as long. |
LoadJson(String)
A static method to load a json file into a new PropertyGroups<string, PropertyGroup> object.
Declaration
public static PropertyGroups LoadJson(string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath | The file path of the json file. |
Returns
Type | Description |
---|---|
PropertyGroups | PropertyGroups<string, PropertyGroup> if successful; otherwise returns null. |
Remove(String)
Removes the specified value with the specified key from the PropertyGroups<string, PropertyGroup> dictionary.
Declaration
public bool Remove(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Name of PropertyGroup |
Returns
Type | Description |
---|---|
System.Boolean | true if the element is successfully found and removed; otherwise, false. This method returns false if the key is not found in the PropertyGroups<string, PropertyGroup> |
SaveJson(String)
Saves the PropertyGroups<string, PropertyGroup> object to a json file.
Declaration
public void SaveJson(string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath | The file path to save the json file. |