/// <summary> /// Initializes the static members in <see cref="PropertyAccessorFactory"/>. /// </summary> static PropertyAccessorFactory() { accessors = new Dictionary <string, IPropertyAccessor>(19); accessors["property"] = new BasicPropertyAccessor(); accessors["field"] = new FieldAccessor(); accessors["backfield"] = new FieldAccessor(new BackFieldStrategy()); accessors["readonly"] = new ReadOnlyAccessor(); accessors["field.camelcase"] = new FieldAccessor(new CamelCaseStrategy()); accessors["field.camelcase-underscore"] = new FieldAccessor(new CamelCaseUnderscoreStrategy()); accessors["field.camelcase-m-underscore"] = new FieldAccessor(new CamelCaseMUnderscoreStrategy()); accessors["field.lowercase"] = new FieldAccessor(new LowerCaseStrategy()); accessors["field.lowercase-underscore"] = new FieldAccessor(new LowerCaseUnderscoreStrategy()); accessors["field.pascalcase-underscore"] = new FieldAccessor(new PascalCaseUnderscoreStrategy()); accessors["field.pascalcase-m-underscore"] = new FieldAccessor(new PascalCaseMUnderscoreStrategy()); accessors["field.pascalcase-m"] = new FieldAccessor(new PascalCaseMStrategy()); accessors["nosetter.camelcase"] = new NoSetterAccessor(new CamelCaseStrategy()); accessors["nosetter.camelcase-underscore"] = new NoSetterAccessor(new CamelCaseUnderscoreStrategy()); accessors["nosetter.camelcase-m-underscore"] = new NoSetterAccessor(new CamelCaseMUnderscoreStrategy()); accessors["nosetter.lowercase"] = new NoSetterAccessor(new LowerCaseStrategy()); accessors["nosetter.lowercase-underscore"] = new NoSetterAccessor(new LowerCaseUnderscoreStrategy()); accessors["nosetter.pascalcase-underscore"] = new NoSetterAccessor(new PascalCaseUnderscoreStrategy()); accessors["nosetter.pascalcase-m-underscore"] = new NoSetterAccessor(new PascalCaseMUnderscoreStrategy()); accessors["nosetter.pascalcase-m"] = new NoSetterAccessor(new PascalCaseMStrategy()); accessors["embedded"] = new EmbeddedPropertyAccessor(); accessors["noop"] = new NoopAccessor(); accessors["none"] = new NoopAccessor(); }
/// <summary> /// Initializes the static members in <see cref="PropertyAccessorFactory"/>. /// </summary> static PropertyAccessorFactory() { accessors = new Dictionary<string, IPropertyAccessor>(19); accessors["property"] = new BasicPropertyAccessor(); accessors["field"] = new FieldAccessor(); accessors["backfield"] = new FieldAccessor(new BackFieldStrategy()); accessors["readonly"] = new ReadOnlyAccessor(); accessors["field.camelcase"] = new FieldAccessor(new CamelCaseStrategy()); accessors["field.camelcase-underscore"] = new FieldAccessor(new CamelCaseUnderscoreStrategy()); accessors["field.lowercase"] = new FieldAccessor(new LowerCaseStrategy()); accessors["field.lowercase-underscore"] = new FieldAccessor(new LowerCaseUnderscoreStrategy()); accessors["field.pascalcase-underscore"] = new FieldAccessor(new PascalCaseUnderscoreStrategy()); accessors["field.pascalcase-m-underscore"] = new FieldAccessor(new PascalCaseMUnderscoreStrategy()); accessors["field.pascalcase-m"] = new FieldAccessor(new PascalCaseMStrategy()); accessors["nosetter.camelcase"] = new NoSetterAccessor(new CamelCaseStrategy()); accessors["nosetter.camelcase-underscore"] = new NoSetterAccessor(new CamelCaseUnderscoreStrategy()); accessors["nosetter.lowercase"] = new NoSetterAccessor(new LowerCaseStrategy()); accessors["nosetter.lowercase-underscore"] = new NoSetterAccessor(new LowerCaseUnderscoreStrategy()); accessors["nosetter.pascalcase-underscore"] = new NoSetterAccessor(new PascalCaseUnderscoreStrategy()); accessors["nosetter.pascalcase-m-underscore"] = new NoSetterAccessor(new PascalCaseMUnderscoreStrategy()); accessors["nosetter.pascalcase-m"] = new NoSetterAccessor(new PascalCaseMStrategy()); accessors["embedded"] = new EmbeddedPropertyAccessor(); accessors["noop"] = new NoopAccessor(); accessors["none"] = new NoopAccessor(); }