예제 #1
0
 /// <summary>
 /// Gets the property/field named <paramref name="name"/>
 /// </summary>
 /// <param name="name">Name of property/field</param>
 /// <param name="isField"><c>true</c> if it's a field, <c>false</c> if it's a property</param>
 /// <returns>A <see cref="CANamedArgument"/> instance or <c>null</c> if not found</returns>
 public CANamedArgument GetNamedArgument(UTF8String name, bool isField)
 {
     foreach (var namedArg in namedArguments.GetSafeEnumerable())
     {
         if (namedArg.IsField == isField && UTF8String.Equals(namedArg.Name, name))
         {
             return(namedArg);
         }
     }
     return(null);
 }
예제 #2
0
 static bool Equals(IAssembly a, IAssembly b)
 {
     if (a == b)
     {
         return(true);
     }
     if (a == null || b == null)
     {
         return(false);
     }
     return(Utils.Equals(a.Version, b.Version) &&
            PublicKeyBase.TokenEquals(a.PublicKeyOrToken, b.PublicKeyOrToken) &&
            UTF8String.Equals(a.Name, b.Name) &&
            UTF8String.CaseInsensitiveEquals(a.Culture, b.Culture));
 }
예제 #3
0
 public bool Equals(ClassName other)
 {
     // Don't check IsValueType
     return(UTF8String.Equals(Namespace, other.Namespace) &&
            UTF8String.Equals(Name, other.Name));
 }
예제 #4
0
 public bool Equals(ClassName other) =>
 // Don't check IsValueType
 UTF8String.Equals(Namespace, other.Namespace) && UTF8String.Equals(Name, other.Name);
예제 #5
0
 public bool Equals(Info other)
 {
     return(stricmp(Scope, other.Scope) &&
            UTF8String.Equals(Identifier, other.Identifier));
 }
예제 #6
0
 public bool Equals(Info other) => stricmp(Scope, other.Scope) && UTF8String.Equals(Identifier, other.Identifier);