Class PhysicalUnitDescriptions
Represents a serializable list of physical unit descriptions.
Inheritance
Implements
Inherited Members
Namespace: Sdl.LanguagePlatform.Core.Tokenization
Assembly: Sdl.LanguagePlatform.Core.dll
Syntax
public class PhysicalUnitDescriptions : IEnumerable<PhysicalUnitDescription>, IEnumerableConstructors
PhysicalUnitDescriptions()
Initializes a new instance with default values. This constructor should not be used directly, it is primarily for XML deserialization.
Declaration
public PhysicalUnitDescriptions()PhysicalUnitDescriptions(PhysicalUnitDescriptions)
Initializes a new instance, using the values contained in another instance. This constructor can be used to create a deep copy.
Declaration
public PhysicalUnitDescriptions(PhysicalUnitDescriptions other)Parameters
| Type | Name | Description | 
|---|---|---|
| PhysicalUnitDescriptions | other | The instance to create a deep copy from | 
Properties
Count
Gets the number of elements in this set.
Declaration
public int Count { get; }Property Value
| Type | Description | 
|---|---|
| System.Int32 | 
Units
Gets or sets the list of physical unit descriptions in this set.
Declaration
public List<PhysicalUnitDescription> Units { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Collections.Generic.List<PhysicalUnitDescription> | 
Methods
Add(PhysicalUnitDescription)
Adds a physical unit description to this set.
Declaration
public void Add(PhysicalUnitDescription d)Parameters
| Type | Name | Description | 
|---|---|---|
| PhysicalUnitDescription | d | The description to add. No duplicate checks are performed. | 
Delete(PhysicalUnitDescription)
Deletes a physical unit description from this set. Not implemented yet, will throw an exception.
Declaration
public void Delete(PhysicalUnitDescription d)Parameters
| Type | Name | Description | 
|---|---|---|
| PhysicalUnitDescription | d | The physical unit description to delete. | 
FindFirst(String)
Finds the first physical unit description which matches the specified unit abbreviation. Not implemented yet, will throw.
Declaration
public PhysicalUnitDescription FindFirst(string abbreviation)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | abbreviation | The abbreviation to search | 
Returns
| Type | Description | 
|---|---|
| PhysicalUnitDescription | Always throws an exception | 
GetEnumerator()
Returns an enumerator which can be used to iterate through the elements of this set.
Declaration
public IEnumerator<PhysicalUnitDescription> GetEnumerator()Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.IEnumerator<PhysicalUnitDescription> | An enumerator | 
Load(CultureInfo, IResourceDataAccessor)
Creates a new instance and obtains, and loads (deserializes) the data from the specified resource accessor, using the provided culture. This method can be used to load a culture-specific set of physical unit descriptions.
Declaration
public static PhysicalUnitDescriptions Load(CultureInfo culture, IResourceDataAccessor accessor)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Globalization.CultureInfo | culture | The culture to use | 
| IResourceDataAccessor | accessor | The resource data accessor to use to obtain the data | 
Returns
| Type | Description | 
|---|---|
| PhysicalUnitDescriptions | A new instance with the data initialized from the resource data | 
Load(Stream)
Creates a new instance and loads (deserializes) the data from the specified input stream.
Declaration
public static PhysicalUnitDescriptions Load(Stream reader)Parameters
| Type | Name | Description | 
|---|---|---|
| System.IO.Stream | reader | The reader to read the data from | 
Returns
| Type | Description | 
|---|---|
| PhysicalUnitDescriptions | A new instance with the data initialized from the stream's data | 
Load(String)
Creates a new instance and loads (deserializes) the data from the specified file name.
Declaration
public static PhysicalUnitDescriptions Load(string fileName)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | fileName | The name of the file to load the data from | 
Returns
| Type | Description | 
|---|---|
| PhysicalUnitDescriptions | A new instance with the data initialized from the file's data | 
Save(Stream)
Saves (serializes) the data of this instance in the specified stream.
Declaration
public void Save(Stream writer)Parameters
| Type | Name | Description | 
|---|---|---|
| System.IO.Stream | writer | The stream to write the output to. | 
Save(String)
Saves (serializes) the data of this instance in the specified file.
Declaration
public void Save(string fileName)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | fileName | The file name to write the output to. | 
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Returns an enumerator which can be used to iterate through the elements of this set.
Declaration
IEnumerator IEnumerable.GetEnumerator()Returns
| Type | Description | 
|---|---|
| System.Collections.IEnumerator | An enumerator |