public void OneTimeSetUp()
        {
            applicationPatcherWpfConfiguration = new ApplicationPatcherWpfConfiguration {
                CommandFieldNameRules = new Configurations.NameRules {
                    Suffix = "Command", Type = NameRulesType.lowerCamelCase
                },
                CommandPropertyNameRules = new Configurations.NameRules {
                    Suffix = "Command", Type = NameRulesType.UpperCamelCase
                },
                CommandExecuteMethodNameRules = new Configurations.NameRules {
                    Prefix = "Execute", Suffix = "Method", Type = NameRulesType.UpperCamelCase
                },
                CommandCanExecuteMethodNameRules = new Configurations.NameRules {
                    Prefix = "CanExecute", Suffix = "Method", Type = NameRulesType.UpperCamelCase
                }
            };

            var nameRulesService = NameRulesServiceHelper.CreateService(applicationPatcherWpfConfiguration);

            commandGrouperService = new CommandGrouperService(applicationPatcherWpfConfiguration, nameRulesService);

            CommandType  = FakeCommonTypeBuilder.Create(KnownTypeNames.ICommand).Build();
            RelayCommand = FakeCommonTypeBuilder.Create(KnownTypeNames.RelayCommand, CommandType).Build();
            fakeCommonAssemblyBuilder = FakeCommonAssemblyBuilder.Create().AddCommonType(CommandType, false).AddCommonType(RelayCommand, false);
            FakeCommonTypeBuilder.ClearCreatedTypes();
        }
예제 #2
0
        public void OneTimeSetUp()
        {
            var applicationPatcherWpfConfiguration = new ApplicationPatcherWpfConfiguration {
                FieldNameRules = new Configurations.NameRules {
                    Type = NameRulesType.lowerCamelCase
                },
                PropertyNameRules = new Configurations.NameRules {
                    Type = NameRulesType.UpperCamelCase
                },
                CommandFieldNameRules = new Configurations.NameRules {
                    Suffix = "Command", Type = NameRulesType.lowerCamelCase
                },
                CommandPropertyNameRules = new Configurations.NameRules {
                    Suffix = "Command", Type = NameRulesType.UpperCamelCase
                },
                DependencyFieldNameRules = new Configurations.NameRules {
                    Suffix = "Property", Type = NameRulesType.UpperCamelCase
                },
                DependencyPropertyNameRules = new Configurations.NameRules {
                    Type = NameRulesType.UpperCamelCase
                },
                CommandExecuteMethodNameRules = new Configurations.NameRules {
                    Prefix = "Execute", Suffix = "Method", Type = NameRulesType.UpperCamelCase
                },
                CommandCanExecuteMethodNameRules = new Configurations.NameRules {
                    Prefix = "CanExecute", Suffix = "Method", Type = NameRulesType.UpperCamelCase
                }
            };

            nameRulesService = NameRulesServiceHelper.CreateService(applicationPatcherWpfConfiguration);
        }
예제 #3
0
        public static NameRulesService CreateService(ApplicationPatcherWpfConfiguration configuration)
        {
            var specificNameRulesServices =
                new SpecificNameRulesService[] {
                new AllLowerNameRules(),
                new AllUpperNameRules(),
                new FirstUpperNameRules(),
                new LowerCamelCaseNameRules(),
                new UpperCamelCaseNameRules()
            };

            return(new NameRulesService(configuration, specificNameRulesServices));
        }
예제 #4
0
        public void OneTimeSetUp()
        {
            applicationPatcherWpfConfiguration = new ApplicationPatcherWpfConfiguration {
                DependencyFieldNameRules = new Configurations.NameRules {
                    Suffix = "Property", Type = NameRulesType.UpperCamelCase
                },
                DependencyPropertyNameRules = new Configurations.NameRules {
                    Type = NameRulesType.UpperCamelCase
                }
            };

            var nameRulesService = NameRulesServiceHelper.CreateService(applicationPatcherWpfConfiguration);

            dependencyGrouperService = new DependencyGrouperService(applicationPatcherWpfConfiguration, nameRulesService);

            DependencyPropertyType    = FakeCommonTypeBuilder.Create(KnownTypeNames.DependencyProperty).Build();
            fakeCommonAssemblyBuilder = FakeCommonAssemblyBuilder.Create().AddCommonType(DependencyPropertyType, false);
            FakeCommonTypeBuilder.ClearCreatedTypes();
        }
        public void OneTimeSetUp()
        {
            applicationPatcherWpfConfiguration = new ApplicationPatcherWpfConfiguration {
                FieldNameRules = new Configurations.NameRules {
                    Type = NameRulesType.lowerCamelCase
                },
                PropertyNameRules = new Configurations.NameRules {
                    Type = NameRulesType.UpperCamelCase
                }
            };

            var nameRulesService = NameRulesServiceHelper.CreateService(applicationPatcherWpfConfiguration);

            propertyGrouperService = new PropertyGrouperService(applicationPatcherWpfConfiguration, nameRulesService);

            CommandType = FakeCommonTypeBuilder.Create(KnownTypeNames.ICommand).Build();
            fakeCommonAssemblyBuilder = FakeCommonAssemblyBuilder.Create().AddCommonType(CommandType, false);
            FakeCommonTypeBuilder.ClearCreatedTypes();
        }
 public NameRulesService(ApplicationPatcherWpfConfiguration applicationPatcherWpfConfiguration, SpecificNameRulesService[] specificNameRulesServices)
 {
     this.applicationPatcherWpfConfiguration = applicationPatcherWpfConfiguration;
     this.specificNameRulesServices          = specificNameRulesServices;
 }
예제 #7
0
 public PropertyGrouperService(ApplicationPatcherWpfConfiguration applicationPatcherWpfConfiguration, NameRulesService nameRulesService)
 {
     this.applicationPatcherWpfConfiguration = applicationPatcherWpfConfiguration;
     this.nameRulesService = nameRulesService;
 }
 public ViewModelPatcher(ApplicationPatcherWpfConfiguration applicationPatcherWpfConfiguration, ViewModelPartPatcher[] viewModelPartPatchers)
 {
     this.applicationPatcherWpfConfiguration = applicationPatcherWpfConfiguration;
     this.viewModelPartPatchers = viewModelPartPatchers;
     log = Log.For(this);
 }
 public FrameworkElementPatcher(ApplicationPatcherWpfConfiguration applicationPatcherWpfConfiguration, FrameworkElementPartPatcher[] frameworkElementPartPatchers)
 {
     this.applicationPatcherWpfConfiguration = applicationPatcherWpfConfiguration;
     this.frameworkElementPartPatchers       = frameworkElementPartPatchers;
     log = Log.For(this);
 }