/// <summary> /// Initializes a new instance of the <see cref="Association" /> class. /// The class captures all bindings between the message content and local resources. /// </summary> /// <param name="data">The UA Semantic Data triple representation. It id not used by current implementation.</param> /// <param name="aliasName">A readable alias name for this instance to be used on User Interface. /// Depending on the implementation this name is used to filter packets against the destination.</param> /// <exception cref="NullReferenceException">data argument must not be null /// or /// aliasName argument must not be null</exception> /// <exception cref="System.ArgumentOutOfRangeException">data argument must not be null /// or /// aliasName argument must not be null</exception> /// <remarks>The DataSet has the following identifiers <see cref="Association.DataDescriptor" /> internal Association(ISemanticData data, string aliasName) { if (data == null) throw new NullReferenceException("data argument must not be null"); DataDescriptor = data; if (String.IsNullOrEmpty(aliasName)) throw new NullReferenceException("aliasName argument must not be null"); m_AliasName = aliasName; p_State = new AssociationStateNoConfiguration(this); }
/// <summary> /// Initializes a new instance of the <see cref="Association" /> class. /// The class captures all bindings between the message content and local resources. /// </summary> /// <param name="data">The UA Semantic Data triple representation. It id not used by current implementation.</param> /// <param name="aliasName">A readable alias name for this instance to be used on User Interface. /// Depending on the implementation this name is used to filter packets against the destination.</param> /// <exception cref="NullReferenceException">data argument must not be null /// or /// aliasName argument must not be null</exception> /// <exception cref="System.ArgumentOutOfRangeException">data argument must not be null /// or /// aliasName argument must not be null</exception> /// <remarks>The DataSet has the following identifiers <see cref="Association.DataDescriptor"/></remarks> internal Association(ISemanticData data, string aliasName) { DataDescriptor = data ?? throw new NullReferenceException("data argument must not be null"); if (string.IsNullOrEmpty(aliasName)) { throw new NullReferenceException("aliasName argument must not be null"); } m_AliasName = aliasName; p_State = new AssociationStateNoConfiguration(this); }
/// <summary> /// Initializes a new instance of the <see cref="ProducerAssociation"/> class. /// </summary> /// <param name="data">The semantic data description.</param> /// <param name="aliasName">Name of the alias - .</param> /// <param name="dataSet">The data set configuration.</param> /// <param name="bindingFactory">The binding factory.</param> /// <param name="encodingFactory">The encoding factory.</param> internal ProducerAssociation(ISemanticData data, string aliasName, DataSetConfiguration dataSet, IBindingFactory bindingFactory, IEncodingFactory encodingFactory) : base(data, dataSet.AssociationName) { m_ConfigurationVersion = dataSet.ConfigurationVersion; m_DataSetBindings = dataSet.DataSet.Select<FieldMetaData, IProducerBinding> ((_fieldMetadata) => { IProducerBinding _ret = _fieldMetadata.GetProducerBinding4DataMember(dataSet.RepositoryGroup, bindingFactory, encodingFactory); _ret.PropertyChanged += ProducerBinding_PropertyChanged; return _ret; }).ToArray<IProducerBinding>(); m_Timer = new Timer(1000) { AutoReset = true }; m_Timer.Elapsed += M_Timer_Elapsed; m_Timer.Start(); }
/// <summary> /// Initializes a new instance of the <see cref="ProducerAssociation"/> class. /// </summary> /// <param name="data">The semantic data description.</param> /// <param name="aliasName">Name of the alias - .</param> /// <param name="dataSet">The data set configuration.</param> /// <param name="bindingFactory">The binding factory.</param> /// <param name="encodingFactory">The encoding factory.</param> internal ProducerAssociation(ISemanticData data, string aliasName, DataSetConfiguration dataSet, IBindingFactory bindingFactory, IEncodingFactory encodingFactory) : base(data, dataSet.AssociationName) { m_ConfigurationVersion = dataSet.ConfigurationVersion; m_DataSetBindings = dataSet.DataSet.Select <FieldMetaData, IProducerBinding> ((_fieldMetadata) => { IProducerBinding _ret = _fieldMetadata.GetProducerBinding4DataMember(dataSet.RepositoryGroup, bindingFactory, encodingFactory); _ret.PropertyChanged += ProducerBinding_PropertyChanged; return(_ret); }).ToArray <IProducerBinding>(); m_Timer = new Timer(1000) { AutoReset = true }; m_Timer.Elapsed += M_Timer_Elapsed; m_Timer.Start(); }
public TestAssociation(ISemanticData data, string aliasName) : this(data, aliasName, true) { }
public TestAssociation(ISemanticData data, string aliasName, bool success) : base(data, aliasName) { m_Success = success; }
/// <summary> /// Initializes a new instance of the <see cref="ConsumerAssociation" /> class. /// </summary> /// <param name="data">The data.</param> /// <param name="dataSet">The members.</param> /// <param name="bindingFactory">The binding factory.</param> /// <param name="encodingFactory">The encoding factory.</param> internal ConsumerAssociation(ISemanticData data, DataSetConfiguration dataSet, IBindingFactory bindingFactory, IEncodingFactory encodingFactory) : base(data, dataSet.AssociationName) { m_DataSetBindings = dataSet.DataSet.Select <FieldMetaData, IConsumerBinding>(x => x.GetConsumerBinding4DataMember(dataSet.RepositoryGroup, bindingFactory, encodingFactory)).ToArray <IConsumerBinding>(); }
/// <summary> /// Initializes a new instance of the <see cref="ConsumerAssociation" /> class. /// </summary> /// <param name="data">The data.</param> /// <param name="dataSet">The members.</param> /// <param name="bindingFactory">The binding factory.</param> /// <param name="encodingFactory">The encoding factory.</param> internal ConsumerAssociation(ISemanticData data, DataSetConfiguration dataSet, IBindingFactory bindingFactory, IEncodingFactory encodingFactory) : base(data, dataSet.AssociationName) { m_DataSetBindings = dataSet.DataSet.Select<FieldMetaData, IConsumerBinding>(x => x.GetConsumerBinding4DataMember(dataSet.RepositoryGroup, bindingFactory, encodingFactory)).ToArray<IConsumerBinding>(); }