Skip to content

Commit

Permalink
修改注释
Browse files Browse the repository at this point in the history
  • Loading branch information
GuQiangJS committed Apr 10, 2018
1 parent c77ee69 commit a1479a7
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
18 changes: 9 additions & 9 deletions src/XPatchLib/Converters/ConverterBase.cs
Expand Up @@ -44,13 +44,13 @@ public virtual bool Divide(string pName, object pOriObject, object pRevObject, D

Guard.ArgumentNotNullOrEmpty(pName, "pName");

if (pRevObject != null && objectsInUse != null)
if (pRevObject != null && _objectsInUse != null)
{
if (objectsInUse.Contains(pRevObject))
if (_objectsInUse.Contains(pRevObject))
throw new InvalidOperationException(
ResourceHelper.GetResourceString(LocalizationRes.Exp_String_CircularReference,
Type.OriType.FullName));
objectsInUse.Add(pRevObject);
_objectsInUse.Add(pRevObject);
}

try
Expand All @@ -77,7 +77,7 @@ public virtual bool Divide(string pName, object pOriObject, object pRevObject, D
finally
{
if (result) WriteEnd(pRevObject);
objectsInUse.Remove(pRevObject);
_objectsInUse.Remove(pRevObject);
}
}

Expand All @@ -87,7 +87,7 @@ public virtual bool Divide(string pName, object pOriObject, object pRevObject, D
/// <param name="item">将其设置复制到当前对象。</param>
public virtual void Assign(IDivide item)
{
objectsInUse = ((ConverterBase) item).objectsInUse;
_objectsInUse = ((ConverterBase) item)._objectsInUse;
}

protected virtual void WriteEnd(Object obj)
Expand Down Expand Up @@ -210,7 +210,7 @@ protected virtual void WriteStart(ParentObject pParentObject)
/// <returns></returns>
protected bool CheckForCircularReference(object pObj)
{
if (pObj != null && objectsInUse != null) return objectsInUse.Contains(pObj);
if (pObj != null && _objectsInUse != null) return _objectsInUse.Contains(pObj);
return true;
}

Expand Down Expand Up @@ -304,7 +304,7 @@ protected virtual bool IsSetNull(Object pOriObject, Object pRevObject, bool pSer
#region Internal Constructors

/// <summary>
/// 使用指定的类型初始化 <see cref="XPatchLib.DivideBase" /> 类的新实例。
/// 使用指定的类型初始化 <see cref="XPatchLib.ConverterBase" /> 类的新实例。
/// </summary>
/// <param name="pWriter">写入器。</param>
/// <param name="pType">指定的类型。</param>
Expand All @@ -317,7 +317,7 @@ protected ConverterBase(ITextWriter pWriter, TypeExtend pType) : this(pType)
}

/// <summary>
/// 使用指定的类型初始化 <see cref="XPatchLib.CombineBase" /> 类的新实例。
/// 使用指定的类型初始化 <see cref="XPatchLib.ConverterBase" /> 类的新实例。
/// </summary>
/// <param name="pType">
/// 指定的类型。
Expand Down Expand Up @@ -505,7 +505,7 @@ protected virtual bool TryFindMember(string pMemberName, out MemberWrapper pMemb
/// </summary>
protected ITextWriter Writer;

private List<object> objectsInUse = new List<object>();
private List<object> _objectsInUse = new List<object>();

#endregion Internal Properties
}
Expand Down
2 changes: 1 addition & 1 deletion src/XPatchLib/Converters/ConverterBasic.cs
Expand Up @@ -16,7 +16,7 @@ namespace XPatchLib
/// <summary>
/// 基础类型增量内容转换类。
/// </summary>
/// <seealso cref="XPatchLib.DivideBase" />
/// <seealso cref="XPatchLib.ConverterBasic" />
internal class ConverterBasic : ConverterBase
{
internal ConverterBasic(ITextWriter pWriter, TypeExtend pType) : base(pWriter, pType)
Expand Down
1 change: 1 addition & 0 deletions src/XPatchLib/Converters/Others/ConverterCultureInfo.cs
Expand Up @@ -59,6 +59,7 @@ private string GetName(object obj)
/// 获取现有对象需要比较的值
/// </summary>
/// <param name="obj"></param>
/// <param name="comparer"></param>
/// <returns></returns>
protected override Dictionary<string, object> GetOriValues(object obj, IEqualityComparer<string> comparer)
{
Expand Down
1 change: 1 addition & 0 deletions src/XPatchLib/Converters/Others/OtherConverterBase.cs
Expand Up @@ -190,6 +190,7 @@ protected override object CombineAction(ITextReader pReader, object pOriObject,
/// 获取现有对象需要比较的值
/// </summary>
/// <param name="obj"></param>
/// <param name="comparer"></param>
/// <returns></returns>
protected abstract Dictionary<string, object> GetOriValues(object obj, IEqualityComparer<string> comparer);

Expand Down
1 change: 1 addition & 0 deletions src/XPatchLib/Serializer.cs
Expand Up @@ -347,6 +347,7 @@ public void RegisterType(Type pType, string[] pPrimaryKeys)
_registerTypes.Add(pType, pPrimaryKeys);
}

/// <inheritdoc />
public void Dispose()
{
Dispose(true);
Expand Down
3 changes: 2 additions & 1 deletion src/XPatchLib/TypeExtend.cs
Expand Up @@ -35,8 +35,9 @@ internal class TypeExtend
#else
private readonly Dictionary<String, ClrHelper.MethodCall<object, object>> Methods;
#endif
#if NET_40_UP || NETSTANDARD_2_0_UP
private readonly bool _isDynamicObject;

#endif
public Type[] InterfaceTypes { get; }

public Boolean IsStack { get; }
Expand Down

0 comments on commit a1479a7

Please sign in to comment.