Beispiel #1
0
        public Boolean Equals(Win32ResourceType other)
        {
            if (Object.ReferenceEquals(this, other))
            {
                return(true);
            }
            if (Object.ReferenceEquals(other, null))
            {
                return(false);
            }
            if (!Object.ReferenceEquals(this.ParentImage, other.ParentImage))
            {
                return(false);
            }

            if (TypeInt > -1 && TypeInt == other.TypeInt)
            {
                return(true);                                                       // type is greater than -1 (use string) and numerical type id is the same
            }
            if (TypeInt == -1 && other.TypeInt == -1)
            {
                return(TypeStr.Equals(other.TypeStr));
            }

            return(false);
        }
Beispiel #2
0
 public override Int32 GetHashCode()
 {
     if (TypeStr == null)
     {
         return(TypeInt.GetHashCode());
     }
     return(TypeStr.GetHashCode() ^ TypeInt.GetHashCode());
 }
Beispiel #3
0
 public ColumnNode(JSONNode sheetValue)
 {
     value = sheetValue;
     Name  = value["name"];
     if (!CastleDBConfig.NamesHaveSpaces && Name.Contains(" "))
     {
         CastleDBConfig.NamesHaveSpaces = true;
     }
     Name    = Name.Replace(" ", "_"); // Remove spaces to avoid compiler errors
     Display = value["display"];
     TypeStr = value["typeStr"];
     if (!CastleDBConfig.NamesHaveSpaces && Name.Contains(" "))
     {
         CastleDBConfig.NamesHaveSpaces = true;
     }
     TypeStr = TypeStr.Replace(" ", "_");
 }
Beispiel #4
0
 public RawParameter(ParameterInfo parameterInfo)
     : base(parameterInfo.ParameterType, parameterInfo.Name, parameterInfo.CustomAttributes.ToArray())
 {
     IsReturnParam = HasAttribute <ReturnAttribute>(attributes);
     ReturnCount   = GetAttrValue <ReturnCountAttribute>(attributes);
     IsReturnSize  = HasAttribute <ReturnSizeAttribute>(attributes);
     if (IsReturnParam)
     {
         IgnoreInWrapper = true;
     }
     if (TypeStr.StartsWith("VkDevice.HandleType") && parameterInfo.Member.DeclaringType == typeof(GenDevice))
     {
         TypeStr = TypeStr.Substring("VkDevice.".Length);
     }
     if (parameterInfo.ParameterType.Name.StartsWith("Vk") && !IsArray)
     {
         ShouldMarshal = false;
     }
 }