80 lines
2.4 KiB
C#
80 lines
2.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using DTS.Common.Utilities;
|
|
using DTS.Common.Utilities.DotNetProgrammingConstructs;
|
|
|
|
namespace DTS.Serialization.Iso
|
|
{
|
|
// *** Iso.File.cs ***
|
|
public partial class File
|
|
{
|
|
// *** Iso.File.Test.cs ***
|
|
public partial class Test
|
|
{
|
|
///
|
|
/// <summary>
|
|
/// ISO-style representation of a custom property.
|
|
/// </summary>
|
|
///
|
|
public class ExtraProperty : Exceptional
|
|
{
|
|
public ExtraProperty(string key, string value)
|
|
{
|
|
_Key.Value = key;
|
|
_Value.Value = value;
|
|
}
|
|
/// <summary>
|
|
/// Get/set the <see cref="string"/> key of the property.
|
|
/// </summary>
|
|
public string Key
|
|
{
|
|
get
|
|
{
|
|
if (!_Key.IsValueInitialized)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
return _Key.Value;
|
|
}
|
|
set => _Key.Value = value;
|
|
}
|
|
|
|
private readonly Property<string> _Key
|
|
= new Property<string>(
|
|
typeof(File).Namespace + ".Iso.File.Test.ExtraProperty.Key",
|
|
null,
|
|
false
|
|
);
|
|
|
|
/// <summary>
|
|
/// Get/set the <see cref="string"/> Value of the property.
|
|
/// </summary>
|
|
public string Value
|
|
{
|
|
get
|
|
{
|
|
if (!_Value.IsValueInitialized)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
return _Value.Value;
|
|
}
|
|
set => _Value.Value = value;
|
|
}
|
|
|
|
private readonly Property<string> _Value
|
|
= new Property<string>(
|
|
typeof(File).Namespace + ".Iso.File.Test.ExtraProperty.Value",
|
|
null,
|
|
false
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|