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