当前位置: 首页>>代码示例>>C#>>正文


C# ObjectLocation类代码示例

本文整理汇总了C#中ObjectLocation的典型用法代码示例。如果您正苦于以下问题:C# ObjectLocation类的具体用法?C# ObjectLocation怎么用?C# ObjectLocation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ObjectLocation类属于命名空间,在下文中一共展示了ObjectLocation类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GraphFSError_MetadataObjectNotFound

 public GraphFSError_MetadataObjectNotFound(ObjectLocation myObjectLocation, String myObjectStream, String myObjectEdition)
 {
     ObjectLocation  = myObjectLocation;
     ObjectStream    = myObjectStream;
     ObjectEdition   = myObjectEdition;
     Message         = String.Format("MetadataObject at location '{0}{1}{0}{2}{0}{3}' not found!", FSPathConstants.PathDelimiter, ObjectLocation, ObjectStream, ObjectEdition);
 }
开发者ID:TheByte,项目名称:sones,代码行数:7,代码来源:GraphFSError_MetadataObjectNotFound.cs

示例2: GraphFSError_CouldNotSetMetadata

 public GraphFSError_CouldNotSetMetadata(ObjectLocation myObjectLocation, String myObjectStream, String myObjectEdition)
 {
     ObjectLocation = myObjectLocation;
     ObjectStream   = myObjectStream;
     ObjectEdition  = myObjectEdition;
     Message        = String.Format("Could not set metadata at location '{1}{0}{2}{0}{3}'!", FSPathConstants.PathDelimiter, ObjectLocation, ObjectStream, ObjectEdition);
 }
开发者ID:TheByte,项目名称:sones,代码行数:7,代码来源:GraphFSError_CouldNotSetMetadata.cs

示例3: Read

        public byte Read(ObjectLocation objLocation)
        {
            byte returnValue = (byte) new Random(objLocation.Index + objLocation.ObjectPath.Length + (int) objLocation.Type).Next(256);
            //byte returnValue = 0;
            switch (objLocation.Type)
            {
                //open the appropriate type of object and read the data inside it
                case ObjectType.FileWithHeader:

                    break;
                case ObjectType.Array:

                    break;
                case ObjectType.LinkedList:

                    break;
                case ObjectType.HashTable:

                    break;
                case ObjectType.Heap:

                    break;
            }
            return returnValue;
        }
开发者ID:glenwatson,项目名称:Distributed-Database,代码行数:25,代码来源:ObjectReadWriter.cs

示例4: ObjServiceMove

        public void ObjServiceMove(String sourceObjectPathString,
                                   String targetLocPathString,
                                   String sourceLocPathString)
        {
            // identify the object to move
            ObjectPath objPath = new ObjectPath(sourceObjectPathString);
            ObjectIdentity docToCopy = new ObjectIdentity();
            docToCopy.Value = objPath;
            docToCopy.RepositoryName = DefaultRepository;

            // identify the folder to move from
            ObjectPath fromFolderPath = new ObjectPath();
            fromFolderPath.Path = sourceLocPathString;
            ObjectIdentity fromFolderIdentity = new ObjectIdentity();
            fromFolderIdentity.Value = fromFolderPath;
            fromFolderIdentity.RepositoryName = DefaultRepository;
            ObjectLocation fromLocation = new ObjectLocation();
            fromLocation.Identity = fromFolderIdentity;

            // identify the folder to move to
            ObjectPath folderPath = new ObjectPath(targetLocPathString);
            ObjectIdentity toFolderIdentity = new ObjectIdentity();
            toFolderIdentity.Value = folderPath;
            toFolderIdentity.RepositoryName = DefaultRepository;
            ObjectLocation toLocation = new ObjectLocation();
            toLocation.Identity = toFolderIdentity;

            OperationOptions operationOptions = null;
            objectService.Move(new ObjectIdentitySet(docToCopy),
                               fromLocation,
                               toLocation,
                               new DataPackage(),
                               operationOptions);
        }
开发者ID:danieldoboseru,项目名称:network-spider,代码行数:34,代码来源:ObjectServiceDemo.cs

示例5: GraphFSError_NoObjectRevisionsFound

 public GraphFSError_NoObjectRevisionsFound(ObjectLocation myObjectLocation, String myObjectStream, String myObjectEdition)
 {
     ObjectLocation  = myObjectLocation;
     ObjectStream    = myObjectStream;
     ObjectEdition   = myObjectEdition;
     Message         = String.Format("No object revisions found at location '{1}{0}{2}{0}{3}'!", FSPathConstants.PathDelimiter, ObjectLocation, ObjectStream, ObjectEdition);
 }
开发者ID:TheByte,项目名称:sones,代码行数:7,代码来源:GraphFSError_NoObjectRevisionsFound.cs

示例6: 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!"));

            ObjectLocation _DirectoryObjectLocation = null;

            try
            {
                _DirectoryObjectLocation = new ObjectLocation(ObjectLocation.ParseString(myCurrentPath), myOptions.ElementAt(1).Value[0].Option);
            }
            catch (Exception e)
            {
                WriteLine(e.Message);
                return Exceptional.OK;
            }

            try
            {
                myAGraphDSSharp.CreateDirectoryObject(_DirectoryObjectLocation);
            }

            catch (Exception e)
            {
                WriteLine(e.Message);
            }

            return Exceptional.OK;
        }
开发者ID:TheByte,项目名称:sones,代码行数:29,代码来源:FSCLI_MKDIR.cs

示例7: 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!"));

            var _Content        = myOptions.ElementAt(1).Value[0].Option;
            var _FileLocation   = new ObjectLocation(ObjectLocation.ParseString(myCurrentPath), myOptions.ElementAt(2).Value[0].Option);

            if (myAGraphDSSharp.ObjectExists(_FileLocation).Value != Trinary.TRUE)
            {

                try
                {
                    AFSObject _FileObject = new FileObject() { ObjectLocation = _FileLocation, ObjectData = Encoding.UTF8.GetBytes(_Content)};
                    myAGraphDSSharp.StoreFSObject(_FileObject, true);
                }
                catch (Exception e)
                {
                    WriteLine(e.Message);
                }

            }

            else
            {

                if (myAGraphDSSharp.ObjectStreamExists(_FileLocation, FSConstants.INLINEDATA).Value)
                {

                }

            }

            return Exceptional.OK;
        }
开发者ID:TheByte,项目名称:sones,代码行数:35,代码来源:FSCLI_ECHO.cs

示例8: CD_private

        private void CD_private(IGraphFSSession myIGraphFSSession, ref String myCurrentPath, String myParameter)
        {
            var _DirectoryObjectLocation = new ObjectLocation(ObjectLocation.ParseString(myCurrentPath), myParameter);

            try
            {

                if ((myIGraphFSSession).ObjectStreamExists(_DirectoryObjectLocation, FSConstants.DIRECTORYSTREAM).Value ||
                    (myIGraphFSSession).ObjectStreamExists(_DirectoryObjectLocation, FSConstants.VIRTUALDIRECTORY).Value)
                {

                    if (myCurrentPath.Equals(FSPathConstants.PathDelimiter) && _DirectoryObjectLocation.Equals("/.."))
                        myCurrentPath = FSPathConstants.PathDelimiter;

                    else
                        myCurrentPath = SimplifyObjectLocation(_DirectoryObjectLocation.ToString());

                }
                else
                    WriteLine("Sorry, this directory does not exist!");

            }

            catch (Exception e)
            {
                WriteLine(e.Message);
                WriteLine(e.StackTrace);
            }
        }
开发者ID:TheByte,项目名称:sones,代码行数:29,代码来源:FSCLI_CD.cs

示例9: NObjectStored

 public NObjectStored(ObjectLocation myObjectLocation, String myObjectStream, String myObjectEdition, ObjectRevisionID myObjectRevisionID)
 {
     ObjectLocation      = myObjectLocation;
     ObjectStream        = myObjectStream;
     ObjectEdition       = myObjectEdition;
     ObjectRevisionID    = myObjectRevisionID;
 }
开发者ID:TheByte,项目名称:sones,代码行数:7,代码来源:NObjectStored.cs

示例10: GraphFSError_ObjectEditionNotFound

 public GraphFSError_ObjectEditionNotFound(ObjectLocation myObjectLocation, String myObjectStream, String myObjectEdition)
 {
     ObjectLocation  = myObjectLocation;
     ObjectStream    = myObjectStream;
     ObjectEdition   = myObjectEdition;
     Message         = String.Format("Object edition '{0}' at location '{1}{2}{3}' not found!", ObjectEdition, ObjectLocation, FSPathConstants.PathDelimiter, ObjectStream);
 }
开发者ID:TheByte,项目名称:sones,代码行数:7,代码来源:GraphFSError_ObjectEditionNotFound.cs

示例11: AccessControlObject

        /// <summary>
        /// The constructor for creating a new AccessControlObject with certain rights.
        /// </summary>
        /// <param name="myObjectLocation">the location of the AccessControlObject (constisting of the ObjectPath and ObjectName) within the file system</param>
        /// <param name="myDefaultRule">This property defines the priority of allowing and denying.</param>
        /// <param name="myAllowACL">The dictionary of rights with corresponding ACLs that allow the access to an object in the GraphFS.</param>
        /// <param name="myDenyACL">The dictionary of rights with corresponding ACLs that denies the access to an object in the GraphFS.</param>
        /// <param name="myNotificationHandling">the NotificationHandling bitfield</param>
        public AccessControlObject(ObjectLocation myObjectLocation, DefaultRuleTypes myDefaultRule, Dictionary<RightUUID, HashSet<EntityUUID>> myAllowACL, Dictionary<RightUUID, HashSet<EntityUUID>> myDenyACL, NHAccessControlObject myNotificationHandling)
        {
            if (myAllowACL == null)
                throw new ArgumentNullException("Invalid AllowACL!");

            if (myDenyACL == null)
                throw new ArgumentNullException("Invalid DenyACL!");

            _AllowACL               = myAllowACL;
            _DenyACL                = myDenyACL;
            _DefaultRule            = myDefaultRule;
            _NotificationHandling   = myNotificationHandling;

            #region calc estimated size

            #region AllowACL

            _estimatedSize += CalcACLSize(myAllowACL);

            #endregion

            #region DenyACL

            _estimatedSize += CalcACLSize(myDenyACL);

            #endregion

            _estimatedSize += EstimatedSizeConstants.EnumByte + EstimatedSizeConstants.EnumUInt64 + GetClassDefaultSize();

            #endregion
        }
开发者ID:TheByte,项目名称:sones,代码行数:39,代码来源:AccessControlObject.cs

示例12: GraphFSError_AllObjectCopiesFailed

 public GraphFSError_AllObjectCopiesFailed(ObjectLocation myObjectLocation, String myObjectStream, String myObjectEdition, ObjectRevisionID myRevisionID)
 {
     ObjectLocation  = myObjectLocation;
     ObjectStream    = myObjectStream;
     ObjectEdition   = myObjectEdition;
     RevisionID      = myRevisionID;
     Message         = String.Format("All object copies at location '{1}{0}{2}{0}{3}{0}{4}' failed!", FSPathConstants.PathDelimiter, ObjectLocation, ObjectStream, ObjectEdition, RevisionID);
 }
开发者ID:TheByte,项目名称:sones,代码行数:8,代码来源:GraphFSError_AllObjectCopiesFailed.cs

示例13: DBTypeManager

 /// <summary>
 /// The constructor.
 /// </summary>
 /// <param name="myIGraphDBSession">The filesystem where the information is stored.</param>
 /// <param name="DatabaseRootPath">The database root path.</param>
 public DBTypeManager(IGraphFSSession myIGraphFS, ObjectLocation myDatabaseRootPath, EntityUUID myUserID, Dictionary<String, ADBSettingsBase> myDBSettings, DBContext dbContext)
 {
     _DBContext = dbContext;
     _UserID = myUserID;
     _DatabaseRootPath                               = myDatabaseRootPath;
     _IGraphFSSession                                = myIGraphFS;
     _ObjectLocationsOfAllUserDefinedDatabaseTypes   = LoadListOfTypeLocations(myDatabaseRootPath);
 }
开发者ID:ipbi,项目名称:sones,代码行数:13,代码来源:DBTypeManager.cs

示例14: GraphFSError_CouldNotOverwriteRevision

 public GraphFSError_CouldNotOverwriteRevision(ObjectLocation myObjectLocation, String myObjectStream, String myObjectEdition, ObjectRevisionID myObjectRevisionID)
 {
     ObjectLocation      = myObjectLocation;
     ObjectStream        = myObjectStream;
     ObjectEdition       = myObjectEdition;
     ObjectRevisionID    = myObjectRevisionID;
     Message             = String.Format("Could not overwrite object revision '{1}{0}{2}{0}{3}{0}{4}'!", FSPathConstants.PathDelimiter, ObjectLocation, ObjectStream, ObjectEdition, ObjectRevisionID);
 }
开发者ID:TheByte,项目名称:sones,代码行数:8,代码来源:GraphFSError_CouldNotOverwriteRevision.cs

示例15: GetChildFS

        public IGraphFS GetChildFS(ObjectLocation myObjectLocation)
        {
            IGraphFS _ChildFS = null;

            if (_ChildFSLookuptable.TryGetValue(myObjectLocation, out _ChildFS))
                return _ChildFS;

            return null;
        }
开发者ID:TheByte,项目名称:sones,代码行数:9,代码来源:MountpointLookup.cs


注:本文中的ObjectLocation类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。