本文整理汇总了C#中ObjectLocation.Substring方法的典型用法代码示例。如果您正苦于以下问题:C# ObjectLocation.Substring方法的具体用法?C# ObjectLocation.Substring怎么用?C# ObjectLocation.Substring使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectLocation
的用法示例。
在下文中一共展示了ObjectLocation.Substring方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
public override Exceptional Execute(AGraphDSSharp myAGraphDSSharp, ref String myCurrentPath, Dictionary<String, List<AbstractCLIOption>> myOptions, String myInputString)
{
if (myAGraphDSSharp == null)
return new Exceptional(new GraphDSError("myAGraphDSSharp must not be null!"));
_CancelCommand = false;
var _tmpObjectLocation = new ObjectLocation(ObjectLocation.ParseString(myCurrentPath), myOptions.ElementAt(1).Value[0].Option);
ObjectLocation _ObjectLocation;
var _ObjectStreamDelimiterPosition = _tmpObjectLocation.IndexOf(FSConstants.ObjectStreamDelimiter);
var _ObjectStreamTypes = new List<String>();
if (_ObjectStreamDelimiterPosition > 0)
{
_ObjectLocation = ObjectLocation.ParseString(_tmpObjectLocation.Substring(0, _ObjectStreamDelimiterPosition));
_ObjectStreamTypes.Add(_tmpObjectLocation.Substring(_ObjectStreamDelimiterPosition + FSConstants.ObjectStreamDelimiter.Length));
}
else
{
_ObjectLocation = _tmpObjectLocation;
_ObjectStreamTypes = new List<String>(myAGraphDSSharp.GetObjectStreams(_ObjectLocation).Value);
}
foreach (var _ObjectStream in _ObjectStreamTypes)
{
WriteLine(_ObjectStream + ":");
WriteLine("");
switch (_ObjectStream)
{
#region SYSTEMMETADATASTREAM
//case FSConstants.SYSTEMMETADATASTREAM:
// foreach (var _KeyValuePair in myAGraphDSSharp.GetSystemMetadata(new ObjectLocation(_ObjectLocation)))
// foreach (var val in _KeyValuePair.Value)
// WriteLine("{0,-25} = {1}", _KeyValuePair.Key, val);
// break;
#endregion
#region USERMETADATASTREAM
//case FSConstants.USERMETADATASTREAM:
// foreach (var _KeyValuePair in myAGraphDSSharp.GetUserMetadata(new ObjectLocation(_ObjectLocation)).Value)
// foreach (var val in _KeyValuePair.Value)
// WriteLine("{0,-25} = {1}", _KeyValuePair.Key, val);
// break;
#endregion
#region UNDEFINEDATTRIBUTESSTREAM
case "UNDEFINEDATTRIBUTESSTREAM":
foreach (var _KeyValuePair in myAGraphDSSharp.GetMetadata<Object>(_ObjectLocation, "UNDEFINEDATTRIBUTESSTREAM", FSConstants.DefaultEdition).Value)
// foreach (var val in _KeyValuePair.Value)
WriteLine("{0,-25} = {1}", _KeyValuePair.Key, _KeyValuePair.Value);
break;
#endregion
#region LISTOF_STRINGS
case FSConstants.LISTOF_STRINGS:
foreach (var _String in myAGraphDSSharp.GetFSObject<ListOfStringsObject>(_ObjectLocation).Value)
WriteLine(_String);
break;
#endregion
#region FILESTREAM
case FSConstants.FILESTREAM:
var FileContent = Encoding.UTF8.GetString(myAGraphDSSharp.GetFSObject<FileObject>(_ObjectLocation, FSConstants.FILESTREAM, null, null, 0, false).Value.ObjectData);
WriteLine(FileContent);
break;
#endregion
#region INLINEDATA
case FSConstants.INLINEDATA:
var _Inlinedata = myAGraphDSSharp.GetFSObject<DirectoryObject>(_ObjectLocation.Path).Value.GetInlineData(_ObjectLocation.Name);
if (_ObjectLocation.Name.Equals(FSConstants.DotUUID))
WriteLine((new ObjectUUID(_Inlinedata)).ToString());
else
WriteLine(_Inlinedata.ToString());
break;
#endregion
}
WriteLine();
//.........这里部分代码省略.........