mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 09:15:27 +08:00 
			
		
		
		
	Add English comments for JsonMap extension package.
This commit is contained in:
		@@ -1,13 +1,11 @@
 | 
				
			|||||||
using System;
 | 
					using System;
 | 
				
			||||||
using System.Linq;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ReSharper disable once CheckNamespace
 | 
				
			||||||
namespace FreeSql.DataAnnotations
 | 
					namespace FreeSql.DataAnnotations
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					 | 
				
			||||||
    /// <summary>
 | 
					    /// <summary>
 | 
				
			||||||
    /// 当实体类属性为【对象】时,以JSON形式映射存储
 | 
					    /// When the entity class property is <see cref="object"/>, map storage in JSON format. <br />
 | 
				
			||||||
 | 
					    /// 当实体类属性为【对象】时,以 JSON 形式映射存储
 | 
				
			||||||
    /// </summary>
 | 
					    /// </summary>
 | 
				
			||||||
    public class JsonMapAttribute : Attribute
 | 
					    public class JsonMapAttribute : Attribute { }
 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -5,7 +5,6 @@ using System.Collections.Concurrent;
 | 
				
			|||||||
using System.Linq;
 | 
					using System.Linq;
 | 
				
			||||||
using System.Linq.Expressions;
 | 
					using System.Linq.Expressions;
 | 
				
			||||||
using System.Reflection;
 | 
					using System.Reflection;
 | 
				
			||||||
using System.Text;
 | 
					 | 
				
			||||||
using System.Threading;
 | 
					using System.Threading;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public static class FreeSqlJsonMapCoreExtensions
 | 
					public static class FreeSqlJsonMapCoreExtensions
 | 
				
			||||||
@@ -24,6 +23,7 @@ public static class FreeSqlJsonMapCoreExtensions
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /// <summary>
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// When the entity class property is <see cref="object"/> and the attribute is marked as <see cref="JsonMapAttribute"/>, map storage in JSON format. <br />
 | 
				
			||||||
    /// 当实体类属性为【对象】时,并且标记特性 [JsonMap] 时,该属性将以JSON形式映射存储
 | 
					    /// 当实体类属性为【对象】时,并且标记特性 [JsonMap] 时,该属性将以JSON形式映射存储
 | 
				
			||||||
    /// </summary>
 | 
					    /// </summary>
 | 
				
			||||||
    /// <returns></returns>
 | 
					    /// <returns></returns>
 | 
				
			||||||
@@ -43,7 +43,7 @@ public static class FreeSqlJsonMapCoreExtensions
 | 
				
			|||||||
            });
 | 
					            });
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        that.Aop.ConfigEntityProperty += new EventHandler<FreeSql.Aop.ConfigEntityPropertyEventArgs>((s, e) =>
 | 
					        that.Aop.ConfigEntityProperty += (s, e) =>
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            var isJsonMap = e.Property.GetCustomAttributes(typeof(JsonMapAttribute), false).Any() || _dicJsonMapFluentApi.TryGetValue(e.EntityType, out var tryjmfu) && tryjmfu.ContainsKey(e.Property.Name);
 | 
					            var isJsonMap = e.Property.GetCustomAttributes(typeof(JsonMapAttribute), false).Any() || _dicJsonMapFluentApi.TryGetValue(e.EntityType, out var tryjmfu) && tryjmfu.ContainsKey(e.Property.Name);
 | 
				
			||||||
            if (isJsonMap)
 | 
					            if (isJsonMap)
 | 
				
			||||||
@@ -61,7 +61,6 @@ public static class FreeSqlJsonMapCoreExtensions
 | 
				
			|||||||
                    });
 | 
					                    });
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        });
 | 
					        };
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user