1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- using System;
- namespace GCAS.Dto
- {
- /// <summary>
- /// Can be used to store Name/Value (or Key/Value) pairs.
- /// </summary>
- [Serializable]
- public class NameValue : NameValue<string>
- {
- /// <summary>
- /// Creates a new <see cref="NameValue"/>.
- /// </summary>
- public NameValue()
- {
- }
- /// <summary>
- /// Creates a new <see cref="NameValue"/>.
- /// </summary>
- public NameValue(string name, string value)
- {
- Name = name;
- Value = value;
- }
- }
- /// <summary>
- /// Can be used to store Name/Value (or Key/Value) pairs.
- /// </summary>
- [Serializable]
- public class NameValue<T>
- {
- /// <summary>
- /// Name.
- /// </summary>
- public string Name { get; set; }
- /// <summary>
- /// Value.
- /// </summary>
- public T Value { get; set; }
- /// <summary>
- /// Creates a new <see cref="NameValue"/>.
- /// </summary>
- public NameValue()
- {
- }
- /// <summary>
- /// Creates a new <see cref="NameValue"/>.
- /// </summary>
- public NameValue(string name, T value)
- {
- Name = name;
- Value = value;
- }
- }
- }
|