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


C# SerializationReader.ReadUInt64方法代码示例

本文整理汇总了C#中SerializationReader.ReadUInt64方法的典型用法代码示例。如果您正苦于以下问题:C# SerializationReader.ReadUInt64方法的具体用法?C# SerializationReader.ReadUInt64怎么用?C# SerializationReader.ReadUInt64使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SerializationReader的用法示例。


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

示例1: Deserialize

        private object Deserialize(ref SerializationReader mySerializationReader, DirectoryEntry myDirectoryEntry)
        {
            try
            {

                #region Read the Inlinedata

                myDirectoryEntry._InlineData = mySerializationReader.ReadByteArray();

                #endregion

                #region Read the INodePositions

                var _NumOfINodePositions = mySerializationReader.ReadUInt32();

                if (_NumOfINodePositions > 0)
                {
                    for (var j = 0UL; j < _NumOfINodePositions; j++)
                    {
                        StorageUUID ID = new StorageUUID();
                        ID.Deserialize(ref mySerializationReader);
                        myDirectoryEntry._INodePositions.Add(new ExtendedPosition(ID, mySerializationReader.ReadUInt64()));
                    }
                }

                #endregion

                #region Read the ObjectStreamsList

                var _NumberOfObjectStreamTypes = mySerializationReader.ReadUInt32();

                if (_NumberOfObjectStreamTypes > 0)
                {
                    for (var j = 0UL; j < _NumberOfObjectStreamTypes; j++)
                        myDirectoryEntry._ObjectStreamsList.Add(mySerializationReader.ReadString());
                }

                #endregion

            }

            catch (GraphFSException e)
            {
                throw new GraphFSException("DirectoryEntry could not be deserialized!\n\n" + e);
            }

            myDirectoryEntry.isDirty = true;

            return myDirectoryEntry;
        }
开发者ID:ipbi,项目名称:sones,代码行数:50,代码来源:DirectoryEntry.cs

示例2: Deserialize

            public void Deserialize(byte[] mySerializedBytes)
            {
                var _SerializationReader = new SerializationReader(mySerializedBytes);

                StorageURIs = new List<String>();
                UInt32 numberOfStorageURIs = _SerializationReader.ReadUInt32();

                for(UInt32 i=0; i<numberOfStorageURIs; i++)
                    StorageURIs.Add(_SerializationReader.ReadString());

                StorageType = _SerializationReader.ReadString();
                StorageSize = _SerializationReader.ReadUInt64();
            }
开发者ID:TheByte,项目名称:sones,代码行数:13,代码来源:NStorageEngine_FreeStorage.cs

示例3: Deserialize

        private object Deserialize(ref SerializationReader mySerializationReader, DirectoryEntry myDirectoryEntry)
        {
            try
            {

                #region Read the Inlinedata

                myDirectoryEntry._InlineData = mySerializationReader.ReadByteArray();

                #region Estimated Size

                if (myDirectoryEntry._InlineData != null)
                {
                    myDirectoryEntry._estimatedSize += Convert.ToUInt64(myDirectoryEntry._InlineData.Length) * EstimatedSizeConstants.Byte;
                }

                #endregion

                #endregion

                #region Read the INodePositions

                #region Estimated Size

                myDirectoryEntry._estimatedSize += EstimatedSizeConstants.HashSet;

                #endregion

                var _NumOfINodePositions = mySerializationReader.ReadUInt32();

                if (_NumOfINodePositions > 0)
                {
                    for (var j = 0UL; j < _NumOfINodePositions; j++)
                    {
                        StorageUUID ID = new StorageUUID();
                        ID.Deserialize(ref mySerializationReader);
                        myDirectoryEntry._INodePositions.Add(new ExtendedPosition(ID, mySerializationReader.ReadUInt64()));

                        #region Estimated Size

                        myDirectoryEntry._estimatedSize += EstimatedSizeConstants.ExtendedPosition;

                        #endregion

                    }
                }

                #endregion

                #region Read the ObjectStreamsList

                #region Estimated Size

                myDirectoryEntry._estimatedSize += EstimatedSizeConstants.HashSet;

                #endregion

                var _NumberOfObjectStreamTypes = mySerializationReader.ReadUInt32();

                if (_NumberOfObjectStreamTypes > 0)
                {
                    for (var j = 0UL; j < _NumberOfObjectStreamTypes; j++)
                    {
                        myDirectoryEntry._ObjectStreamsList.Add(mySerializationReader.ReadString());

                        #region Estimated Size

                        myDirectoryEntry._estimatedSize += EstimatedSizeConstants.Char * EstimatedSizeConstants.EstimatedObjectStreamNameLength;

                        #endregion

                    }
                }

                #endregion

            }

            catch (GraphFSException e)
            {
                throw new GraphFSException("DirectoryEntry could not be deserialized!\n\n" + e);
            }

            myDirectoryEntry.isDirty = true;

            return myDirectoryEntry;
        }
开发者ID:TheByte,项目名称:sones,代码行数:87,代码来源:DirectoryEntry.cs

示例4: Deserialize

        public override void Deserialize(ref SerializationReader mySerializationReader)
        {
            UInt16 NumberOfObjectLocatorPositions;
            UInt16 NumberOfINodePositions;

            try
            {

                #region Read Common attributes

                _CreationTime                   =           mySerializationReader.ReadUInt64();
                _LastModificationTime           =           mySerializationReader.ReadUInt64();
                _LastAccessTime                 =           mySerializationReader.ReadUInt64();
                _DeletionTime                   =           mySerializationReader.ReadUInt64();
                _ObjectSize                     =           mySerializationReader.ReadUInt64();

                #endregion

                #region Object Safety and Security

                _IntegrityCheckAlgorithm        =           (IntegrityCheckTypes)mySerializationReader.ReadOptimizedByte();
                _EncryptionAlgorithm            =           (SymmetricEncryptionTypes)mySerializationReader.ReadOptimizedByte();

                #endregion

                #region Read list of ObjectLocatorPositions

                _ObjectLocatorLength            =           mySerializationReader.ReadUInt64();
                _ObjectLocatorCopies            =           mySerializationReader.ReadUInt64();

                NumberOfObjectLocatorPositions  =           mySerializationReader.ReadUInt16();
                _ObjectLocatorPositions         =           new List<ExtendedPosition>();

                for (int i = 1; i <= NumberOfObjectLocatorPositions; i++)
                    _ObjectLocatorPositions.Add(new ExtendedPosition(new StorageUUID(mySerializationReader.ReadByteArray()), mySerializationReader.ReadUInt64()));

                #endregion

                #region Read list of INodePositions

                NumberOfINodePositions          =           mySerializationReader.ReadUInt16();
                _INodePositions                 =           new List<ExtendedPosition>();

                for (int i = 1; i <= NumberOfINodePositions; i++)
                    _INodePositions.Add(new ExtendedPosition(new StorageUUID(mySerializationReader.ReadByteArray()), mySerializationReader.ReadUInt64()));

                #endregion

                #region Read State

                _ObjectLocatorStates = (ObjectLocatorStates)mySerializationReader.ReadOptimizedByte();

                #endregion

            }

            catch (Exception e)
            {
                throw new GraphFSException_INodeCouldNotBeDeserialized("INode could not be deserialized!\n\n" + e);
            }

            //isDirty = true;       // this is not useful!
        }
开发者ID:TheByte,项目名称:sones,代码行数:63,代码来源:INode.cs

示例5: Deserialize

 private object Deserialize(ref SerializationReader mySerializationReader, DBUInt64 myValue)
 {
     myValue._Value = mySerializationReader.ReadUInt64();
     return myValue;
 }
开发者ID:TheByte,项目名称:sones,代码行数:5,代码来源:DBUInt64.cs

示例6: Deserialize

        public override void Deserialize(ref SerializationReader mySerializationReader)
        {
            UInt32 _Capacity;

            if (mySerializationReader != null)
            {
                try
                {
                    _UUID = new TypeUUID(this.ObjectUUID.GetByteArray());
                    ParentTypeUUID = new TypeUUID();
                    ParentTypeUUID.Deserialize(ref mySerializationReader);
                    _IsUserDefined = mySerializationReader.ReadBoolean();
                    _IsAbstract = mySerializationReader.ReadBoolean();
                    _Comment = mySerializationReader.ReadString();

                    _Capacity = mySerializationReader.ReadUInt32();

                    _Attributes = new Dictionary<AttributeUUID, TypeAttribute>();

                    _TypeAttributeLookupTable = new Dictionary<AttributeUUID, TypeAttribute>();

                    for (UInt32 i = 0; i < _Capacity; i++)
                    {
                        var _AttrAtrib = new AttributeUUID();
                        _AttrAtrib.Deserialize(ref mySerializationReader);
                        var _TypeObj = new TypeAttribute();
                        _TypeObj.Deserialize(ref mySerializationReader);
                        _Attributes.Add(_AttrAtrib, _TypeObj);
                        _TypeAttributeLookupTable.Add(_AttrAtrib, _TypeObj);
                    }

                    _Capacity = mySerializationReader.ReadUInt32();
                    _TypeSettings = new Dictionary<String, ADBSettingsBase>();

                    for (var i = 0; i < _Capacity; i++)
                    {
                        ADBSettingsBase _ADBSettingsBase = (ADBSettingsBase) mySerializationReader.ReadObject();
                        if(_ADBSettingsBase != null)
                            _TypeSettings.Add(_ADBSettingsBase.Name, _ADBSettingsBase);
                    }

                    _Capacity = mySerializationReader.ReadUInt32();
                    _UniqueAttributes = new List<AttributeUUID>();
                    AttributeUUID AttribID = null;

                    for (UInt32 i = 0; i < _Capacity; i++)
                    {
                        AttribID = new AttributeUUID(ref mySerializationReader);
                        _UniqueAttributes.Add(AttribID);
                    }

                    _Capacity = mySerializationReader.ReadUInt32();
                    _MandatoryAttributes = new HashSet<AttributeUUID>();

                    for (UInt32 i = 0; i < _Capacity; i++)
                    {
                        AttribID = new AttributeUUID(ref mySerializationReader);
                        _MandatoryAttributes.Add(AttribID);
                    }

                    ObjectDirectoryShards = mySerializationReader.ReadUInt16();

                    #region Indices

                    _AttributeIndices = new Dictionary<IndexKeyDefinition, Dictionary<String, AAttributeIndex>>();
                    _AttributeIndicesNameLookup = new Dictionary<String, IndexKeyDefinition>();

                    var idxCount = mySerializationReader.ReadUInt32();
                    for (var i = 0; i < idxCount; i++)
                    {

                        var idxKey = new IndexKeyDefinition();
                        idxKey.Deserialize(ref mySerializationReader);

                        //_AttributeIndices.Add(idxKey, new Dictionary<String, AttributeIndex>());

                        var idxVersionCount = mySerializationReader.ReadUInt32();

                        for (var j = 0; j < idxVersionCount; j++)
                        {

                            var key                 = mySerializationReader.ReadString();
                            var fileSystemLocation  = new ObjectLocation(mySerializationReader.ReadString());
                            var indexEdition        = mySerializationReader.ReadString();
                            var indexName           = mySerializationReader.ReadString();
                            var indexType           = mySerializationReader.ReadString();
                            var isUUIDIdx           = mySerializationReader.ReadBoolean();
                            var keyCount            = mySerializationReader.ReadUInt64();
                            var valueCount          = mySerializationReader.ReadUInt64();
                            var attributeIdxShards = mySerializationReader.ReadUInt16();

                            //var CreateIdxExcept = CreateAttributeIndex(indexName, idxKey.IndexKeyAttributeUUIDs, indexEdition, indexObjectType, fileSystemLocation);

                            if (isUUIDIdx)
                            {
                                AddAttributeIndex(new UUIDIndex(indexName, idxKey, this, attributeIdxShards, indexType, indexEdition, keyCount));
                            }
                            else
                            {
                                AddAttributeIndex(new AttributeIndex(indexName, idxKey, this, attributeIdxShards, indexType, indexEdition, keyCount, valueCount));
//.........这里部分代码省略.........
开发者ID:TheByte,项目名称:sones,代码行数:101,代码来源:GraphDBType.cs

示例7: Deserialize

        public override void Deserialize(ref SerializationReader mySerializationReader)
        {
            #region Data

            UInt64               _NumberOfACLs;
            RightUUID            _RightUUID;
            EntityUUID           _EntityUUID;
            UInt64               _NumberOfEntityUUIDs;
            HashSet<EntityUUID>  _EntityUUIDHashSet;

            #endregion

            try
            {

                #region NotificationHandling

                _NotificationHandling = (NHAccessControlObject)mySerializationReader.ReadOptimizedByte();

                #endregion

                #region DefaultRule

                _DefaultRule = (DefaultRuleTypes)mySerializationReader.ReadOptimizedByte();

                #endregion

                #region AllowACL

                _AllowACL = new Dictionary<RightUUID, HashSet<EntityUUID>>();

                _NumberOfACLs = mySerializationReader.ReadUInt64();

                for (UInt64 i=0; i<_NumberOfACLs; i++)
                {

                    #region KEY

                    _RightUUID = new RightUUID(mySerializationReader.ReadByteArray());

                    #endregion

                    #region VALUE

                    _EntityUUIDHashSet = new HashSet<EntityUUID>();

                    _NumberOfEntityUUIDs = mySerializationReader.ReadUInt64();

                    for (UInt64 j=0; j<_NumberOfEntityUUIDs; j++)
                    {
                        _EntityUUID = new EntityUUID(mySerializationReader.ReadByteArray());
                        _EntityUUIDHashSet.Add(_EntityUUID);
                    }

                    // Finally... add it to the AllowACL!
                    _AllowACL.Add(_RightUUID, _EntityUUIDHashSet);

                    #endregion

                }

                #endregion

                #region DenyACL

                _DenyACL = new Dictionary<RightUUID, HashSet<EntityUUID>>();

                _NumberOfACLs = mySerializationReader.ReadUInt64();

                for (UInt64 i=0; i<_NumberOfACLs; i++)
                {

                    #region KEY

                    _RightUUID = new RightUUID(mySerializationReader.ReadByteArray());

                    #endregion

                    #region VALUE

                    _EntityUUIDHashSet = new HashSet<EntityUUID>();

                    _NumberOfEntityUUIDs = mySerializationReader.ReadUInt64();

                    for (UInt64 j=0; j<_NumberOfEntityUUIDs; j++)
                    {
                        _EntityUUID = new EntityUUID(mySerializationReader.ReadByteArray());
                        _EntityUUIDHashSet.Add(_EntityUUID);
                    }

                    // Finally... add it to the DenyACL!
                    _DenyACL.Add(_RightUUID, _EntityUUIDHashSet);

                    #endregion

                }

                #endregion

            }
//.........这里部分代码省略.........
开发者ID:ipbi,项目名称:sones,代码行数:101,代码来源:AccessControlObject.cs


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