Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NewAudience" /> class.
        /// </summary>
        /// <param name="name">The human-friendly display name for this Audience. (required).</param>
        /// <param name="integration">Integration that this audience was created in. (required).</param>
        /// <param name="integrationId">The ID of this Audience in the third-party integration (required).</param>
        public NewAudience(string name = default(string), IntegrationEnum integration = default(IntegrationEnum), string integrationId = default(string))
        {
            // to ensure "name" is required (not null)
            if (name == null)
            {
                throw new InvalidDataException("name is a required property for NewAudience and cannot be null");
            }
            else
            {
                this.Name = name;
            }

            // to ensure "integration" is required (not null)
            if (integration == null)
            {
                throw new InvalidDataException("integration is a required property for NewAudience and cannot be null");
            }
            else
            {
                this.Integration = integration;
            }

            // to ensure "integrationId" is required (not null)
            if (integrationId == null)
            {
                throw new InvalidDataException("integrationId is a required property for NewAudience and cannot be null");
            }
            else
            {
                this.IntegrationId = integrationId;
            }
        }
        public static void Init(IntegrationEnum integration)
        {
            AggregateCatalog catalog = new AggregateCatalog();

            catalog.Catalogs.Add(integration == IntegrationEnum.IdentityProvider
                ? new AssemblyCatalog(Assembly.GetAssembly(typeof (MembershipImplementationsAspNetAssembly)))
                : new AssemblyCatalog(Assembly.GetAssembly(typeof (MembershipImplementationsTraditionalAssembly))));

            MefBase.SetContainer(new CompositionContainer(catalog, true));
        }
Пример #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Audience" /> class.
        /// </summary>
        /// <param name="accountId">The ID of the account that owns this entity. (required).</param>
        /// <param name="id">Unique ID for this entity. (required).</param>
        /// <param name="created">The exact moment this entity was created. (required).</param>
        /// <param name="name">The human-friendly display name for this Audience. (required).</param>
        /// <param name="integration">Integration that this audience was created in. (required).</param>
        /// <param name="integrationId">The ID of this Audience in the third-party integration (required).</param>
        public Audience(int accountId = default(int), int id = default(int), DateTime created = default(DateTime), string name = default(string), IntegrationEnum integration = default(IntegrationEnum), string integrationId = default(string))
        {
            // to ensure "accountId" is required (not null)
            if (accountId == null)
            {
                throw new InvalidDataException("accountId is a required property for Audience and cannot be null");
            }
            else
            {
                this.AccountId = accountId;
            }

            // to ensure "id" is required (not null)
            if (id == null)
            {
                throw new InvalidDataException("id is a required property for Audience and cannot be null");
            }
            else
            {
                this.Id = id;
            }

            // to ensure "created" is required (not null)
            if (created == null)
            {
                throw new InvalidDataException("created is a required property for Audience and cannot be null");
            }
            else
            {
                this.Created = created;
            }

            // to ensure "name" is required (not null)
            if (name == null)
            {
                throw new InvalidDataException("name is a required property for Audience and cannot be null");
            }
            else
            {
                this.Name = name;
            }

            // to ensure "integration" is required (not null)
            if (integration == null)
            {
                throw new InvalidDataException("integration is a required property for Audience and cannot be null");
            }
            else
            {
                this.Integration = integration;
            }

            // to ensure "integrationId" is required (not null)
            if (integrationId == null)
            {
                throw new InvalidDataException("integrationId is a required property for Audience and cannot be null");
            }
            else
            {
                this.IntegrationId = integrationId;
            }
        }