public OverriddenProtectionProviderProperty(IServiceProvider serviceProvider, EnvironmentOverriddenElementProperty overridesProperty, ProtectionProviderProperty originalProperty, EnvironmentOverriddenElementPayload payload)
            : base(serviceProvider)
        {
            Guard.ArgumentNotNull(overridesProperty, "overridesProperty");
            Guard.ArgumentNotNull(originalProperty, "originalPropery");

            this.payload = payload;
            this.originalProperty = originalProperty;
            this.overridesProperty = overridesProperty;

            this.overridesProperty.PropertyChanged += OverridesPropertyPropertyChanged;
            this.originalProperty.PropertyChanged += OriginalProperyPropertyChanged;
        }
        public OverriddenProtectionProviderProperty(IServiceProvider serviceProvider, EnvironmentOverriddenElementProperty overridesProperty, ProtectionProviderProperty originalProperty, EnvironmentOverriddenElementPayload payload)
            : base(serviceProvider)
        {
            Guard.ArgumentNotNull(overridesProperty, "overridesProperty");
            Guard.ArgumentNotNull(originalProperty, "originalPropery");

            this.payload           = payload;
            this.originalProperty  = originalProperty;
            this.overridesProperty = overridesProperty;

            this.overridesProperty.PropertyChanged += OverridesPropertyPropertyChanged;
            this.originalProperty.PropertyChanged  += OriginalProperyPropertyChanged;
        }
Exemplo n.º 3
0
        public void SetProtectionProvider(SectionViewModel section, ProtectionProviderProperty originalProperty, string value)
        {
            var overridenValue = GetOverriddenProtectionProviderElement(section);

            if (overridenValue != null)
            {
                overridenValue.ProtectionProvider = value;
            }
            else
            {
                environmentSection.OverriddenProtectionProviders.Add(new EnvironmentOverriddenProtectionProviderElement()
                {
                    ConfigurationSectionName = section.SectionName,
                    ContainingSectionXPath   = section.Path,
                    ProtectionProvider       = value
                });
            }
        }
        public void SetProtectionProvider(SectionViewModel section, ProtectionProviderProperty originalProperty, string value)
        {
            var overridenValue = GetOverriddenProtectionProviderElement(section);

            if (overridenValue != null)
            {
                overridenValue.ProtectionProvider = value;
            }
            else
            {
                environmentSection.OverriddenProtectionProviders.Add(new EnvironmentOverriddenProtectionProviderElement()
                                                                         {
                                                                             ConfigurationSectionName = section.SectionName,
                                                                             ContainingSectionXPath = section.Path,
                                                                             ProtectionProvider = value
                                                                         });
            }
        }
        public string GetProtectionProvider(SectionViewModel section, ProtectionProviderProperty originalProperty)
        {
            var overridenValue = GetOverriddenProtectionProviderElement(section);

            return (overridenValue == null) ? (string)originalProperty.Value : overridenValue.ProtectionProvider;

        }
Exemplo n.º 6
0
        public string GetProtectionProvider(SectionViewModel section, ProtectionProviderProperty originalProperty)
        {
            var overridenValue = GetOverriddenProtectionProviderElement(section);

            return((overridenValue == null) ? (string)originalProperty.Value : overridenValue.ProtectionProvider);
        }