Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 public override Int32 GetHashCode()
 {
     if (TypeStr == null)
     {
         return(TypeInt.GetHashCode());
     }
     return(TypeStr.GetHashCode() ^ TypeInt.GetHashCode());
 }
Ejemplo n.º 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(" ", "_");
 }
Ejemplo n.º 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;
     }
 }