1010namespace BootstrapBlazor . Components ;
1111
1212/// <summary>
13- ///
13+ /// 数据转换器集合类
1414/// </summary>
15- public class SocketDataConverterCollections
15+ public sealed class SocketDataConverterCollections
1616{
1717 readonly ConcurrentDictionary < Type , ISocketDataConverter > _converters = new ( ) ;
1818 readonly ConcurrentDictionary < MemberInfo , SocketDataPropertyConverterAttribute > _propertyConverters = new ( ) ;
@@ -22,7 +22,7 @@ public class SocketDataConverterCollections
2222 /// </summary>
2323 /// <typeparam name="TEntity"></typeparam>
2424 /// <param name="converter"></param>
25- public void AddOrUpdateTypeConverter < TEntity > ( ISocketDataConverter < TEntity > converter )
25+ public void AddTypeConverter < TEntity > ( ISocketDataConverter < TEntity > converter )
2626 {
2727 var type = typeof ( TEntity ) ;
2828 _converters . AddOrUpdate ( type , t => converter , ( t , v ) => converter ) ;
@@ -32,15 +32,15 @@ public void AddOrUpdateTypeConverter<TEntity>(ISocketDataConverter<TEntity> conv
3232 /// 增加默认数据类型转换器方法 转换器使用 <see cref="SocketDataConverter{TEntity}"/>
3333 /// </summary>
3434 /// <typeparam name="TEntity"></typeparam>
35- public void AddOrUpdateTypeConverter < TEntity > ( ) => AddOrUpdateTypeConverter ( new SocketDataConverter < TEntity > ( this ) ) ;
35+ public void AddTypeConverter < TEntity > ( ) => AddTypeConverter ( new SocketDataConverter < TEntity > ( this ) ) ;
3636
3737 /// <summary>
3838 /// 添加属性类型转化器方法
3939 /// </summary>
4040 /// <typeparam name="TEntity"></typeparam>
4141 /// <param name="propertyExpression"></param>
4242 /// <param name="attribute"></param>
43- public void AddOrUpdatePropertyConverter < TEntity > ( Expression < Func < TEntity , object ? > > propertyExpression , SocketDataPropertyConverterAttribute attribute )
43+ public void AddPropertyConverter < TEntity > ( Expression < Func < TEntity , object ? > > propertyExpression , SocketDataPropertyConverterAttribute attribute )
4444 {
4545 if ( propertyExpression . Body is MemberExpression memberExpression )
4646 {
0 commit comments