/// <summary> /// Convert to specification in server format /// </summary> /// <returns></returns> override public String ToString() { String descStr = String.Empty; if (Description != null) { descStr = Description.Replace("\n", "\n\t"); } String Type = _type.ToString(StringEnumCase.Lower); String ParentPath = String.Empty; if (Parent != null) { ParentPath = Parent.Path.ToString(); if (ParentPath == "None") { ParentPath = ParentPath.ToLower(); } } String pathsView = String.Empty; if (Paths != null) { pathsView = Paths.ToString().Replace("\r\n", "\r\n\t").Trim(); } String remappedView = String.Empty; if (Remapped != null) { remappedView = Remapped.ToString().Replace("\r\n", "\r\n\t").Trim(); } String ignoredView = String.Empty; if (Ignored != null) { ignoredView = Ignored.ToString().Replace("\r\n", "\r\n\t").Trim(); } string customFieldsString = String.Empty; if (CustomFields.Count != 0) { customFieldsString = CustomFieldsToString(); } String ParentView = _parentView.ToString(StringEnumCase.Lower); String value = String.Format(StreamSpecFormat, Id, FormBase.FormatDateTime(Updated), FormBase.FormatDateTime(Accessed), OwnerName, Name, ParentPath, Type, descStr, _options.ToString(), ParentView, pathsView, remappedView, ignoredView, customFieldsString); return(value); }
/// <summary> /// Convert to specification in server format /// </summary> /// <returns></returns> override public String ToString() { String DepotType = _type.ToString(StringEnumCase.Lower); //String Address = ToString(); String value = String.Format(DepotSpecFormat, Id, Owner, FormBase.FormatDateTime(Modified), Description, DepotType, Address, Suffix, Map, StreamDepth); return(value); }
/// <summary> /// Dump a FileType as a string /// </summary> /// <returns>string description of FileType</returns> public override string ToString() { String v = String.Empty; if (BaseType != BaseFileType.Unspecified) { v = _baseType.ToString(StringEnumCase.Lower); } if (Modifiers != FileTypeModifier.None) { v += "+"; if ((Modifiers & FileTypeModifier.ModTime) != 0) { v += "m"; } if ((Modifiers & FileTypeModifier.Writable) != 0) { v += "w"; } if ((Modifiers & FileTypeModifier.Exec) != 0) { v += "x"; } if ((Modifiers & FileTypeModifier.KeywordsAll) != 0) { v += "k"; } if ((Modifiers & FileTypeModifier.KeywordsLimited) != 0) { v += "ko"; } if ((Modifiers & FileTypeModifier.ExclusiveOpen) != 0) { v += "l"; } if ((Modifiers & FileTypeModifier.CompressedFiles) != 0) { v += "C"; } if ((Modifiers & FileTypeModifier.RCSDeltaFiles) != 0) { v += "D"; } if ((Modifiers & FileTypeModifier.FullRevisions) != 0) { v += "F"; } if ((Modifiers & FileTypeModifier.HeadrevOnly) != 0) { v += "S"; } if (((Modifiers & FileTypeModifier.NRevsOnly) != 0) && (StoredRevs >= 1)) { v += String.Format("S{0}", StoredRevs); } if ((Modifiers & FileTypeModifier.ArchiveTrigger) != 0) { v += "X"; } } return(v); }