public static int ResourceBaseParse(ResourceBase resourceBase, string[] strSplit, int strCnt) { int count = 0; resourceBase.UniqueID = Convert.ToUInt64(strSplit[strCnt] == null ? "0" : strSplit[strCnt]); strCnt++; resourceBase.Admin = new UserBase(Convert.ToUInt64(strSplit[strCnt] == null ? "0" : strSplit[strCnt])); strCnt++; strCnt = ResourceDescription.Parse(resourceBase.ResourceDescription, strSplit, strCnt); resourceBase.ResourcePriority = (EResourcePriority)Convert.ToInt32(strSplit[strCnt] == null ? "0" : strSplit[strCnt]); strCnt++; resourceBase.MaxHoldings = Convert.ToInt32(strSplit[strCnt] == null ? "0" : strSplit[strCnt]); strCnt++; count = Convert.ToInt32(strSplit[strCnt] == null ? "0" : strSplit[strCnt]); strCnt++; for (int i = 0; i < count; i++) { if (strSplit[strCnt] == null) { break; } resourceBase.HoldingsInfo.Add(new HoldingsInfo(Convert.ToUInt64(strSplit[strCnt]))); strCnt++; } resourceBase.Scalable = Convert.ToBoolean(strSplit[strCnt] == null ? "0" : strSplit[strCnt]); strCnt++; resourceBase.Value = Convert.ToInt32(strSplit[strCnt] == null ? "0" : strSplit[strCnt]); strCnt++; strCnt = NameImage.Parse(resourceBase.ThumbNameImage, strSplit, strCnt); strCnt = NameImage.Parse(resourceBase.FullNameImage, strSplit, strCnt); return(strCnt); }
public ResourceNote(UInt64 uniqueID, UserBase noteWriter, string note, DateTime?entryDate, ResourceBase resourceBase) : base(uniqueID) { mNoteWriter = noteWriter; mResourceBase = resourceBase; mNote = note; mEntryDate = entryDate; }
public ResourceImage(UInt64 uniqueID, UserBase imageOwner, string imageLocation, DateTime?entryDate, ResourceBase resourceBase) : base(uniqueID) { mResourceBase = resourceBase; mImageOwner = imageOwner; mImageLocation = imageLocation; mEntryDate = entryDate; }
// Exceptions: // System.ArgumentException: // Other object is null // The argument to compare is not a UserBase // Refering object (this) is null public override int CompareTo(object other) { if (other == null) { throw new System.ArgumentException("Other object is null", "other"); } ResourceBase resourceBase = other as ResourceBase; if (resourceBase == null) { throw new System.ArgumentException("The argument to compare is not a resourceBase", "other"); } if (IsNull)// || (!IsLoaded())) { throw new System.ArgumentException("Refering object (this) is null", "this"); } return(this.ToString().CompareTo(resourceBase.ToString())); }
public ResourceNote(UInt64 uniqueID) : base(uniqueID) { mNoteWriter = new UserBase(); mResourceBase = new ResourceBase(); }
public ResourceNote() { mNoteWriter = new UserBase(); mResourceBase = new ResourceBase(); }
public ResourceImage(UInt64 uniqueID) : base(uniqueID) { mResourceBase = new ResourceBase(); mImageOwner = new UserBase(); }
public ResourceImage() { mResourceBase = new ResourceBase(); mImageOwner = new UserBase(); }