internal KeyFamily Parse(DSDDocument dsd) { KeyFamily keyFamily = new KeyFamily("keyFamilyName","lsdkfj", "agnencyID"); XElement kfElement = dsd.GetKeyFamilyElement(); foreach (var keFamilyElement in kfElement.Elements()) { if (keFamilyElement.Name.LocalName == "Components") { foreach (var element in keFamilyElement.Elements()) { if (element.Name.LocalName == "Dimension") { var parser = new DimensionParser(); var dimension = parser.Parse(element, dsd); keyFamily.AddDimension(dimension); } } } } return keyFamily; }
public ECKeyPair DeriveKey(KeyFamily keyFamily, uint index) { ExtKey key = new ExtKey(_walletService.Key.PrivateKeyData); KeyPath keyPath = KeyPathHelper.Create(_networkParameters.CoinType, keyFamily, (int)index); ExtKey derivedKey = key.Derive(keyPath); return(new ECKeyPair(derivedKey.PrivateKey.GetBytes(), true)); }
internal Group(Id id, KeyFamily keyFamily) { Contract.AssertNotNull(id, "id"); Contract.AssertNotNull(keyFamily, "keyFamily"); Id = id; KeyFamily = keyFamily; Description = new InternationalText(); }
public ObsValueMap(KeyFamily keyFamily) { _keyFamily = keyFamily; Map(o => converter.Serialize(o, out startTime)).ToAttribute("value", true) .Set(v => s = v) .Converter(new StringConverter()); Map(o => startTime).ToAttribute("startTime", false) .Set(v => startTime = v) .Converter(new StringConverter()); }
public DataMessageMap(KeyFamily keyFamily) { RegisterNamespace("common", Namespaces.Common); RegisterNamespace("generic", Namespaces.Generic); ElementsOrder("Header", "DataSet"); Map(o => o.Header).ToElement("Header", true) .Set(v => _message.Header = v) .ClassMap(() => new HeaderMap()); Map(o => o.DataSet).ToElement(Namespaces.Generic + "DataSet", true) .Set(v => _message.DataSet = v) .ClassMap(() => new DataSetMap(keyFamily)); }
public ValueMap(KeyFamily keyFamily) { _keyFamily = keyFamily; Map(o => o.Key).ToAttribute("concept", true) .Set(v => id = v) .Converter(new IDConverter()); Map(o => converter.Serialize(o.Value, out startTime)).ToAttribute("value", true) .Set(v => s = v) .Converter(new StringConverter()); Map(o => startTime).ToAttribute("startTime", false) .Set(v => startTime = v) .Converter(new StringConverter()); }
public DataSetMap(KeyFamily keyFamily) { _dataSet = new DataSet(keyFamily); Map(o => o.KeyFamily.ID).ToSimpleElement(Namespaces.Generic + "KeyFamilyRef", true) .Set(id => VerifyKeyFamilyRef(id)) .Converter(new IDConverter()); MapContainer(Namespaces.Generic + "Attributes", false) .MapCollection(o => GetKeyValues(o.Attributes)).ToElement("Value", false) .Set(v => _dataSet.Attributes.Add(v.Concept, v.Value)) .ClassMap(() => new KeyValueMap()); MapCollection(o => o.Series).ToElement(Namespaces.Generic + "Series", false) .ClassMap(() => new SeriesMap(_dataSet)); }
public GroupDescriptorMap(KeyFamily keyFamily) { ElementsOrder("DimensionRef", "AttachmentConstraintRef", "Description", "Annotations"); Map(o => o.ID).ToAttribute("id", true) .Set(v => _group = keyFamily.CreateNewGroup(v)) .Converter(new IDConverter()); MapCollection(o => o.Dimensions.Select(d => d.Concept.ID)).ToSimpleElement("DimensionRef", true) .Set(v => _group.AddDimension(v)) .Converter(new IDConverter()); Map(o => o.AttachmentConstraintRef).ToSimpleElement("AttachmentConstraintRef", false) .Set(v => _group.AttachmentConstraintRef = v) .Converter(new IDConverter()); MapCollection(o => o.Description).ToElement("Description", false) .Set(v => _group.Description.Add(v)) .ClassMap(() => new InternationalStringMap()); }
internal KeyFamily Parse(DSDDocument dsd) { KeyFamily keyFamily = new KeyFamily("keyFamilyName", "lsdkfj", "agnencyID"); XElement kfElement = dsd.GetKeyFamilyElement(); foreach (var keFamilyElement in kfElement.Elements()) { if (keFamilyElement.Name.LocalName == "Components") { foreach (var element in keFamilyElement.Elements()) { if (element.Name.LocalName == "Dimension") { var parser = new DimensionParser(); var dimension = parser.Parse(element, dsd); keyFamily.AddDimension(dimension); } } } } return(keyFamily); }
public GenericDataWriter(TextWriter textWriter, KeyFamily keyFamily, XmlWriterSettings settings) : base(textWriter, keyFamily, settings) { }
public GenericDataWriter(StringBuilder stringBuilder, KeyFamily keyFamily, XmlWriterSettings settings) : base(stringBuilder, keyFamily, settings) { }
public DataValidator(KeyFamily keyFamily) { KeyFamily = keyFamily; }
public MessageGroupReader(XmlReader xmlReader, KeyFamily keyFamily) { XmlReader = xmlReader; KeyFamily = keyFamily; ThrowExceptionIfNotValid = true; }
public MessageGroupReader(string fileName, KeyFamily keyFamily) : this(XmlReader.Create(fileName), keyFamily) { }
public DataWriter(XmlWriter writer, KeyFamily keyFamily) { KeyFamily = keyFamily; XmlWriter = writer; _validator = new DataValidator(keyFamily); }
public CompactDataWriter(string path, KeyFamily keyFamily, string prefix, string targetNamespace) : base(path, keyFamily) { _prefix = prefix; _targetNamespace = targetNamespace; }
public CompactDataWriter(StringBuilder stringBuilder, KeyFamily keyFamily, string prefix, string targetNamespace) : base(stringBuilder, keyFamily) { _prefix = prefix; _targetNamespace = targetNamespace; }
public DataWriter(StringBuilder stringBuilder, KeyFamily keyFamily, XmlWriterSettings settings) { KeyFamily = keyFamily; XmlWriter = XmlWriter.Create(stringBuilder, settings); _validator = new DataValidator(keyFamily); }
public DataWriter(TextWriter textWriter, KeyFamily keyFamily, XmlWriterSettings settings) { KeyFamily = keyFamily; XmlWriter = XmlWriter.Create(textWriter, settings); _validator = new DataValidator(keyFamily); }
public DataWriter(string path, KeyFamily keyFamily, XmlWriterSettings settings) { KeyFamily = keyFamily; XmlWriter = XmlWriter.Create(path, settings); _validator = new DataValidator(keyFamily); }
public DataWriter(TextWriter textWriter, KeyFamily keyFamily) { KeyFamily = keyFamily; XmlWriter = XmlWriter.Create(textWriter, new XmlWriterSettings() { Indent = true }); _validator = new DataValidator(keyFamily); }
public DataWriter(StringBuilder stringBuilder, KeyFamily keyFamily) { KeyFamily = keyFamily; XmlWriter = XmlWriter.Create(stringBuilder, new XmlWriterSettings() { Indent = true }); _validator = new DataValidator(keyFamily); }
internal DataReader(XmlReader reader, KeyFamily keyFamily) { XmlReader = reader; KeyFamily = keyFamily; ThrowExceptionIfNotValid = true; }
public CompactDataWriter(TextWriter textWriter, KeyFamily keyFamily, XmlWriterSettings settings, string prefix, string targetNamespace) : base(textWriter, keyFamily, settings) { _prefix = prefix; _targetNamespace = targetNamespace; }
public GenericDataWriter(string path, KeyFamily keyFamily) : base(path, keyFamily) { }
public GenericDataReader(XmlReader xmlReader, KeyFamily keyFamily) : base(xmlReader, keyFamily) { }
public CompactDataWriter(XmlWriter writer, KeyFamily keyFamily, string prefix, string targetNamespace) : base(writer, keyFamily) { _prefix = prefix; _targetNamespace = targetNamespace; }
public GenericDataWriter(Stream stream, KeyFamily keyFamily) : base(stream, keyFamily) { }
public CompactDataWriter(Stream stream, KeyFamily keyFamily, XmlWriterSettings settings, string prefix, string targetNamespace) : base(stream, keyFamily, settings) { _prefix = prefix; _targetNamespace = targetNamespace; }
public GenericDataWriter(XmlWriter writer, KeyFamily keyFamily) : base(writer, keyFamily) { }
public CompactDataReader(XmlReader xmlReader, KeyFamily keyFamily) : base(xmlReader, keyFamily) { }
public GenericDataWriter(StringBuilder stringBuilder, KeyFamily keyFamily) : base(stringBuilder, keyFamily) { }
/// <summary> /// Create a data reader based on an xml data reader. This mathod looks into the first element /// and creates the right reader (Generic, Compact, Utility, CrossSectional). /// </summary> /// <param name="reader">The reader.</param> /// <param name="keyFamily">The key family.</param> /// <returns>An instance of the DataReader.</returns> public static DataReader Create(XmlReader reader, KeyFamily keyFamily) { Contract.AssertNotNull(reader, "reader"); if (reader.ReadState == ReadState.Initial) { reader.Read(); } if (reader.NodeType != XmlNodeType.Element) { reader.ReadNextStartElement(); } if (reader.LocalName == "CompactData") return new CompactDataReader(reader, keyFamily); else if (reader.LocalName == "GenericData") return new GenericDataReader(reader, keyFamily); else throw new SDMXException("Unsupported root element ({0}) for data file.", reader.LocalName); }
public GenericDataWriter(string path, KeyFamily keyFamily, XmlWriterSettings settings) : base(path, keyFamily, settings) { }
public MessageGroupReader(Stream stream, KeyFamily keyFamily) : this(XmlReader.Create(stream), keyFamily) { }
public GenericDataWriter(Stream stream, KeyFamily keyFamily, XmlWriterSettings settings) : base(stream, keyFamily, settings) { }
public GenericDataWriter(TextWriter textWriter, KeyFamily keyFamily) : base(textWriter, keyFamily) { }
public static KeyPath Create(int coinType, KeyFamily keyFamily, int index) { return(KeyPath.Parse($"m/{Bip043Purpose}'/{coinType}/{(int)keyFamily}/{KeyDerivationVersion}/{index}")); }