コード例 #1
0
ファイル: INode.cs プロジェクト: TheByte/sones
        public void CopyTo(INode myINode)
        {
            myINode._StructureVersion   = _StructureVersion;
            myINode.ObjectUUID          = ObjectUUID;

            #region Copy INode-specific Data

            #region Copy Common attributes

            myINode._CreationTime = _CreationTime;
            myINode._LastAccessTime = _LastAccessTime;
            myINode._LastModificationTime = _LastModificationTime;
            myINode._DeletionTime = _DeletionTime;
            myINode._ObjectSize = _ObjectSize;

            #endregion

            #region Object Safety and Security

            myINode._IntegrityCheckAlgorithm = _IntegrityCheckAlgorithm;
            myINode._EncryptionAlgorithm = _EncryptionAlgorithm;

            #endregion

            #region Copy list of ObjectLocatorPositions

            myINode._ObjectLocatorLength = _ObjectLocatorLength;
            myINode._ObjectLocatorCopies = _ObjectLocatorCopies;
            myINode._ObjectLocatorPositions = _ObjectLocatorPositions;

            #endregion

            #region Clone list of INodePositions

            myINode._INodePositions = _INodePositions;

            #endregion

            #endregion

            myINode._ObjectLocatorReference = _ObjectLocatorReference;
        }
コード例 #2
0
ファイル: INode.cs プロジェクト: TheByte/sones
        public override AFSStructure Clone()
        {
            var newINode = new INode();
            newINode._StructureVersion  = _StructureVersion;
            newINode.ObjectUUID         = ObjectUUID;

            #region Clone INode-specific Data

            #region Clone Common attributes

            newINode._CreationTime = _CreationTime;
            newINode._LastAccessTime = _LastAccessTime;
            newINode._LastModificationTime = _LastModificationTime;
            newINode._DeletionTime = _DeletionTime;
            newINode._ObjectSize = _ObjectSize;

            #endregion

            #region Object Safety and Security

            newINode._IntegrityCheckAlgorithm = _IntegrityCheckAlgorithm;
            newINode._EncryptionAlgorithm = _EncryptionAlgorithm;

            #endregion

            #region Clone list of ObjectLocatorPositions

            newINode._ObjectLocatorLength = _ObjectLocatorLength;
            newINode._ObjectLocatorCopies = _ObjectLocatorCopies;

            newINode._ObjectLocatorPositions = new List<ExtendedPosition>();

            foreach (var _ExtendedPosition in _ObjectLocatorPositions)
                newINode._ObjectLocatorPositions.Add(new ExtendedPosition(_ExtendedPosition.StorageUUID, _ExtendedPosition.Position));

            #endregion

            #region Clone list of INodePositions

            newINode._INodePositions = new List<ExtendedPosition>();

            foreach (var _ExtendedPosition in _INodePositions)
                newINode._INodePositions.Add(new ExtendedPosition(_ExtendedPosition.StorageUUID, _ExtendedPosition.Position));

            #endregion

            #region State

            newINode._ObjectLocatorStates = _ObjectLocatorStates;

            #endregion

            #endregion

            newINode._ObjectLocatorReference = _ObjectLocatorReference;

            return newINode;
        }
コード例 #3
0
ファイル: JSON_IO.cs プロジェクト: TheByte/sones
 public Byte[] ExportINode(INode myINode)
 {
     return new UTF8Encoding().GetBytes(myINode.ToJSON().ToString(Formatting.Indented));
 }
コード例 #4
0
ファイル: HTML_IO.cs プロジェクト: TheByte/sones
 public Byte[] ExportINode(INode myINode)
 {
     throw new NotImplementedException();
 }
コード例 #5
0
ファイル: Serialized_IO.cs プロジェクト: TheByte/sones
 public Byte[] ExportINode(INode myINode)
 {
     return null;
 }
コード例 #6
0
ファイル: XML_IO.cs プロジェクト: TheByte/sones
 public Byte[] ExportINode(INode myINode)
 {
     return new UTF8Encoding().GetBytes(myINode.ToXML().ToString());
 }