Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 8f99149

Browse files
committed
Rename to PropertyAccessor / FieldAccessor
1 parent 71bde69 commit 8f99149

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

src/ServiceStack.Text/TypeFields.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
namespace ServiceStack
1414
{
15-
public class TypeFieldInfo
15+
public class FieldAccessor
1616
{
17-
public TypeFieldInfo(
17+
public FieldAccessor(
1818
FieldInfo fieldInfo,
1919
GetMemberDelegate publicGetter,
2020
SetMemberDelegate publicSetter,
@@ -48,7 +48,7 @@ static TypeFields()
4848
try
4949
{
5050
var fnRef = fi.SetExpressionRef<T>();
51-
Instance.FieldsMap[fi.Name] = new TypeFieldInfo(
51+
Instance.FieldsMap[fi.Name] = new FieldAccessor(
5252
fi,
5353
PclExport.Instance.CreateGetter(fi),
5454
PclExport.Instance.CreateSetter(fi),
@@ -66,9 +66,9 @@ static TypeFields()
6666
}
6767
}
6868

69-
public static TypeFieldInfo GetAccessor(string propertyName)
69+
public static FieldAccessor GetAccessor(string propertyName)
7070
{
71-
return Instance.FieldsMap.TryGetValue(propertyName, out TypeFieldInfo info)
71+
return Instance.FieldsMap.TryGetValue(propertyName, out FieldAccessor info)
7272
? info
7373
: null;
7474
}
@@ -103,17 +103,17 @@ public static TypeFields Get(Type type)
103103
return instance;
104104
}
105105

106-
public TypeFieldInfo GetAccessor(string propertyName)
106+
public FieldAccessor GetAccessor(string propertyName)
107107
{
108-
return FieldsMap.TryGetValue(propertyName, out TypeFieldInfo info)
108+
return FieldsMap.TryGetValue(propertyName, out FieldAccessor info)
109109
? info
110110
: null;
111111
}
112112

113113
public Type Type { get; protected set; }
114114

115-
public readonly Dictionary<string, TypeFieldInfo> FieldsMap =
116-
new Dictionary<string, TypeFieldInfo>(PclExport.Instance.InvariantComparerIgnoreCase);
115+
public readonly Dictionary<string, FieldAccessor> FieldsMap =
116+
new Dictionary<string, FieldAccessor>(PclExport.Instance.InvariantComparerIgnoreCase);
117117

118118
public FieldInfo[] PublicFieldInfos { get; protected set; }
119119

@@ -134,7 +134,7 @@ public virtual GetMemberDelegate GetPublicGetter(string name)
134134
if (name == null)
135135
return null;
136136

137-
return FieldsMap.TryGetValue(name, out TypeFieldInfo info)
137+
return FieldsMap.TryGetValue(name, out FieldAccessor info)
138138
? info.PublicGetter
139139
: null;
140140
}
@@ -146,7 +146,7 @@ public virtual SetMemberDelegate GetPublicSetter(string name)
146146
if (name == null)
147147
return null;
148148

149-
return FieldsMap.TryGetValue(name, out TypeFieldInfo info)
149+
return FieldsMap.TryGetValue(name, out FieldAccessor info)
150150
? info.PublicSetter
151151
: null;
152152
}
@@ -156,7 +156,7 @@ public virtual SetMemberRefDelegate GetPublicSetterRef(string name)
156156
if (name == null)
157157
return null;
158158

159-
return FieldsMap.TryGetValue(name, out TypeFieldInfo info)
159+
return FieldsMap.TryGetValue(name, out FieldAccessor info)
160160
? info.PublicSetterRef
161161
: null;
162162
}

src/ServiceStack.Text/TypeProperties.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ namespace ServiceStack
1515
[Obsolete("Use TypeProperties<T>.Instance")]
1616
public static class TypeReflector<T> { }
1717

18-
public class TypePropertyInfo
18+
public class PropertyAccessor
1919
{
20-
public TypePropertyInfo(
20+
public PropertyAccessor(
2121
PropertyInfo propertyInfo,
2222
GetMemberDelegate publicGetter,
2323
SetMemberDelegate publicSetter)
@@ -46,7 +46,7 @@ static TypeProperties()
4646
{
4747
try
4848
{
49-
Instance.PropertyMap[pi.Name] = new TypePropertyInfo(
49+
Instance.PropertyMap[pi.Name] = new PropertyAccessor(
5050
pi,
5151
PclExport.Instance.CreateGetter(pi),
5252
PclExport.Instance.CreateSetter(pi)
@@ -59,9 +59,9 @@ static TypeProperties()
5959
}
6060
}
6161

62-
public static TypePropertyInfo GetAccessor(string propertyName)
62+
public static PropertyAccessor GetAccessor(string propertyName)
6363
{
64-
return Instance.PropertyMap.TryGetValue(propertyName, out TypePropertyInfo info)
64+
return Instance.PropertyMap.TryGetValue(propertyName, out PropertyAccessor info)
6565
? info
6666
: null;
6767
}
@@ -96,17 +96,17 @@ public static TypeProperties Get(Type type)
9696
return instance;
9797
}
9898

99-
public TypePropertyInfo GetAccessor(string propertyName)
99+
public PropertyAccessor GetAccessor(string propertyName)
100100
{
101-
return PropertyMap.TryGetValue(propertyName, out TypePropertyInfo info)
101+
return PropertyMap.TryGetValue(propertyName, out PropertyAccessor info)
102102
? info
103103
: null;
104104
}
105105

106106
public Type Type { get; protected set; }
107107

108-
public readonly Dictionary<string, TypePropertyInfo> PropertyMap =
109-
new Dictionary<string, TypePropertyInfo>(PclExport.Instance.InvariantComparerIgnoreCase);
108+
public readonly Dictionary<string, PropertyAccessor> PropertyMap =
109+
new Dictionary<string, PropertyAccessor>(PclExport.Instance.InvariantComparerIgnoreCase);
110110

111111
public PropertyInfo[] PublicPropertyInfos { get; protected set; }
112112

@@ -127,7 +127,7 @@ public GetMemberDelegate GetPublicGetter(string name)
127127
if (name == null)
128128
return null;
129129

130-
return PropertyMap.TryGetValue(name, out TypePropertyInfo info)
130+
return PropertyMap.TryGetValue(name, out PropertyAccessor info)
131131
? info.PublicGetter
132132
: null;
133133
}
@@ -139,7 +139,7 @@ public SetMemberDelegate GetPublicSetter(string name)
139139
if (name == null)
140140
return null;
141141

142-
return PropertyMap.TryGetValue(name, out TypePropertyInfo info)
142+
return PropertyMap.TryGetValue(name, out PropertyAccessor info)
143143
? info.PublicSetter
144144
: null;
145145
}

0 commit comments

Comments
 (0)