当前位置: 首页>>代码示例>>C#>>正文


C# ElementViewModel类代码示例

本文整理汇总了C#中ElementViewModel的典型用法代码示例。如果您正苦于以下问题:C# ElementViewModel类的具体用法?C# ElementViewModel怎么用?C# ElementViewModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ElementViewModel类属于命名空间,在下文中一共展示了ElementViewModel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OverriddenElementViewModel

 public OverriddenElementViewModel(ElementLookup lookup, EnvironmentMergeSection environmentSection, ElementViewModel subject)
 {
     this.lookup = lookup;
     this.environmentSection = environmentSection;
     this.elementReference = new ReferenceContainer(this);
     this.subject = subject;
 }
开发者ID:jmeckley,项目名称:Enterprise-Library-5.0,代码行数:7,代码来源:OverriddenElementViewModel.cs

示例2: SaveMergedEnvironmentConfigurationCommand

 public SaveMergedEnvironmentConfigurationCommand(IUIServiceWpf uiService, ConfigurationSourceModel configurationSource, IApplicationModel application, ElementViewModel overridesViewModel)
     : base(uiService)
 {
     this.configurationSource = configurationSource;
     this.application = application;
     this.overridesViewModel = (EnvironmentSourceViewModel)overridesViewModel;
 }
开发者ID:HondaBey,项目名称:EnterpriseLibrary6,代码行数:7,代码来源:SaveMergedEnvironmentConfigurationCommand.cs

示例3: Act

 protected override void Act()
 {
     var parameterValueProperty = base.ParameterElement.Property("Value");
     parameterValueProperty.Value = typeof(DependencyElement);
     
     var valueElementProperty = (ValueElementProperty)ParameterElement.Property("Value");
     dependencyParameterViewModel = valueElementProperty.ValueElementViewModel;
 }
开发者ID:HondaBey,项目名称:EnterpriseLibrary6,代码行数:8,代码来源:when_assinging_dependency_value.cs

示例4: Act

        protected override void Act()
        {
            var parameterValueProperty = base.ParameterElement.Property("Value");
            parameterValueProperty.Value = typeof(OptionalElement);

            var valueElementProperty = (ValueElementProperty)ParameterElement.Property("Value");
            optionalParameterViewModel = valueElementProperty.ValueElementViewModel;
        }
开发者ID:HondaBey,项目名称:EnterpriseLibrary6,代码行数:8,代码来源:when_assinging_optional_value.cs

示例5: RangeValidatorCultureProperty

 public RangeValidatorCultureProperty(IServiceProvider serviceProvider, ElementViewModel parent, PropertyDescriptor declaringProperty)
     : base(serviceProvider, parent, declaringProperty, 
            new Attribute[]{
                               new TypeConverterAttribute(typeof(CultureInfoConverter)), 
                               new DesigntimeDefaultAttribute(cultureInfoConverter.ConvertToInvariantString(CultureInfo.CurrentCulture))
                           })
 {
 }
开发者ID:jmeckley,项目名称:Enterprise-Library-5.0,代码行数:8,代码来源:RangeValidatorCultureProperty.cs

示例6: ElementValidationResult

        public ElementValidationResult(ElementViewModel element, string errorMessage, bool isWarning)
            : base(errorMessage, isWarning)
        {
            Guard.ArgumentNotNull(element, "element");

            this.element = element;

            this.element.PropertyChanged += ElementPropertyChangedHandler;
        }
开发者ID:HondaBey,项目名称:EnterpriseLibrary6,代码行数:9,代码来源:ElementValidationResult.cs

示例7: SetProperties

        protected override void SetProperties(ElementViewModel createdElement, Type selectedType)
        {
            base.SetProperties(createdElement, selectedType);

            if (createdElement.ConfigurationType == typeof(KeyedHashAlgorithmProviderData))
            {
                createdElement.Property("Key").Value = keySettings;
            }
        }
开发者ID:HondaBey,项目名称:EnterpriseLibrary6,代码行数:9,代码来源:HashAlgorithmProviderAddCommand.cs

示例8: GetExtendedProperties

        /// <summary>
        /// Returns the set of <see cref="Property"/> elements to add to the <see cref="ElementViewModel"/>.
        /// </summary>
        /// <param name="subject">The <see cref="ElementViewModel"/> to provide properties for.</param>
        /// <returns>
        /// Returns the set of additional <see cref="Property"/> items to add to the <paramref name="subject"/>.
        /// </returns>
        public IEnumerable<Property> GetExtendedProperties(ElementViewModel subject)
        {
            var attributesPropertyDescriptor = TypeDescriptor.GetProperties(subject.ConfigurationType).OfType<PropertyDescriptor>().FirstOrDefault(x => x.Name == "Attributes");
            
            yield return subject.ContainingSection.CreateProperty<CustomAttributesProperty>(
                    new DependencyOverride<ElementViewModel>(subject),
                    new DependencyOverride<PropertyDescriptor>(attributesPropertyDescriptor));

        }
开发者ID:jmeckley,项目名称:Enterprise-Library-5.0,代码行数:16,代码来源:CustomAttributesPropertyExtender.cs

示例9: Arrange

        protected override void Arrange()
        {
            base.Arrange();

            LoggingSectionViewModel = SectionViewModel.CreateSection(Container, LoggingSettings.SectionName, base.LoggingSection);
            EmailTraceListener = LoggingSectionViewModel.GetDescendentsOfType<EmailTraceListenerData>().First();
        }
开发者ID:jmeckley,项目名称:Enterprise-Library-5.0,代码行数:7,代码来源:given_email_trace_listener.cs

示例10: Arrange

        protected override void Arrange()
        {
            base.Arrange();

            var namespacesCollection = (ElementCollectionViewModel)UnitySectionViewModel.ChildElement("Namespaces");
            NamespaceElement = namespacesCollection.AddNewCollectionElement(typeof(NamespaceElement));
        }
开发者ID:HondaBey,项目名称:EnterpriseLibrary6,代码行数:7,代码来源:given_namespace_element.cs

示例11: Arrange

        protected override void Arrange()
        {
            base.Arrange();

            var assembliesCollection = (ElementCollectionViewModel)UnitySectionViewModel.ChildElement("Assemblies");
            AssemblyElement = assembliesCollection.AddNewCollectionElement(typeof(AssemblyElement));
        }
开发者ID:HondaBey,项目名称:EnterpriseLibrary6,代码行数:7,代码来源:given_assembly_element.cs

示例12: Arrange

        protected override void Arrange()
        {
            base.Arrange();

            step = Container.Resolve<SelectDatabaseStep>();
            connectionStringSettings = ConnectionStringSection.DescendentConfigurationsOfType<ConnectionStringSettings>().First();
        }
开发者ID:HondaBey,项目名称:EnterpriseLibrary6,代码行数:7,代码来源:when_picking_existing_connection.cs

示例13: Arrange

        protected override void Arrange()
        {
            base.Arrange();

            var loggingSection = SectionViewModel.CreateSection(Container, LoggingSettings.SectionName, base.LoggingSection);
            TraceSource = loggingSection.GetDescendentsOfType<TraceSourceData>().First();
        }
开发者ID:jmeckley,项目名称:Enterprise-Library-5.0,代码行数:7,代码来源:given_trace_source.cs

示例14: Arrange

        protected override void Arrange()
        {
            base.Arrange();

            ElementCollectionViewModel injectionMembersCollection = (ElementCollectionViewModel)RegistrationElement.ChildElement("InjectionMembers");
            PropertyElement = injectionMembersCollection.AddNewCollectionElement(typeof(PropertyElement));
        }
开发者ID:HondaBey,项目名称:EnterpriseLibrary6,代码行数:7,代码来源:given_property_element.cs

示例15: Arrange

        protected override void Arrange()
        {
            base.Arrange();

            var resources = new ResourceHelper<ConfigFileLocator>();
            resources.DumpResourceFileToDisk("empty.config");

            var applicationViewModel = Container.Resolve<ApplicationViewModel>();
            ConfigurationSourceModel sourceModel = applicationViewModel.CurrentConfigurationSource;
            applicationViewModel.NewEnvironment();

            EhabModel = sourceModel.AddSection(ExceptionHandlingSettings.SectionName, Section);
            EnvironmentViewModel = applicationViewModel.Environments.First();
            EnvironmentSection = (EnvironmentalOverridesSection)EnvironmentViewModel.ConfigurationElement;

            ((EnvironmentSourceViewModel)EnvironmentViewModel).EnvironmentConfigurationFile = "empty.config";
            ((EnvironmentSourceViewModel)EnvironmentViewModel).EnvironmentDeltaFile = "empty.config";

            WrapHandler = EhabModel.DescendentElements().Where(x => x.ConfigurationType == typeof(WrapHandlerData)).First();

            MainExceptionMessage = WrapHandler.Property("ExceptionMessage");
            MainExceptionMessage.Value = "Main Value";

            OverridesProperty = WrapHandler.Properties.Where(x => x.PropertyName.StartsWith("Overrides")).First(); 
            OverriddenExceptionMessage = OverridesProperty.ChildProperties.Where(x => x.PropertyName == "ExceptionMessage").First();
        }
开发者ID:jmeckley,项目名称:Enterprise-Library-5.0,代码行数:26,代码来源:when_attaching_empty_overrides.cs


注:本文中的ElementViewModel类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。