public static AssociationConfiguration FromAssociationStorage(AssociationStorage associationStorage) { AssociationConfiguration associationConfiguration = new AssociationConfiguration(associationStorage.OrganizationalUnitRoot.ObjectGuid, associationStorage.Id.ObjectGuid); UnifiedPolicyStorageFactory.CopyPropertiesFromStorage <AssociationConfiguration>(associationConfiguration, new TenantSettingFacade <AssociationStorage>(associationStorage)); return(associationConfiguration); }
/// <summary> /// Adds the message handler to the selected by the <see cref="AssociationConfiguration.AssociationName"/>. /// </summary> /// <param name="messageHandler">The message handler to be associated.</param> /// <param name="configuration">The configuration.</param> /// <remarks>If this dictionary does not contain the <see cref="AssociationConfiguration.AssociationName"/> key the request is skipped - no action is undertaken.</remarks> internal void AddMessageHandler(IMessageHandler messageHandler, AssociationConfiguration configuration) { if (!this.ContainsKey(configuration.AssociationName)) { return; } Association _ass = this[configuration.AssociationName]; _ass.AddMessageHandler(messageHandler, configuration); }
public static AssociationStorage ToAssociationStorage(AssociationConfiguration association) { AssociationStorage associationStorage = new AssociationStorage(); associationStorage[ADObjectSchema.OrganizationalUnitRoot] = new ADObjectId(association.TenantId); associationStorage.Name = association.Name; associationStorage.SetId((ADObjectId)DalHelper.ConvertFromStoreObject(association.ObjectId, typeof(ADObjectId))); UnifiedPolicyStorageFactory.CopyPropertiesToStorage <AssociationConfiguration>(new TenantSettingFacade <AssociationStorage>(associationStorage), association); return(associationStorage); }
protected internal override void AddMessageHandler(IMessageHandler messageHandler, AssociationConfiguration configuration) { throw new NotImplementedException(); }
protected internal override void AddMessageHandler(IMessageHandler messageHandler, AssociationConfiguration configuration) { base.AddMessageHandler(messageHandler, configuration); AddMessageReader(messageHandler as IMessageReader); }
/// <summary> /// Adds the message handler. It must initialize binding between the <see cref="IMessageHandler" /> and the local data resources. /// </summary> /// <param name="messageHandler">The message handler.</param> /// <param name="configuration">The configuration.</param> internal protected virtual void AddMessageHandler(IMessageHandler messageHandler, AssociationConfiguration configuration) { DataSetId = new DataSelector() { DataSetWriterId = configuration.DataSetWriterId, PublisherId = configuration.PublisherId }; }
protected internal override void AddMessageHandler(IMessageHandler messageHandler, AssociationConfiguration configuration) { base.AddMessageHandler(messageHandler, configuration); ProducerAssociationConfiguration _configuration = (ProducerAssociationConfiguration)configuration; m_Encoding = _configuration.FieldEncoding; AddMessageWriter(messageHandler as IMessageWriter); }