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


C# SerializationWriter.WriteString方法代码示例

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


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

示例1: Serialize

            public byte[] Serialize()
            {
                var _SerializationWriter = new SerializationWriter();
                _SerializationWriter.WriteString(ThrowedException);

                return _SerializationWriter.ToArray();
            }
开发者ID:TheByte,项目名称:sones,代码行数:7,代码来源:NException_UnhandledExceptionInsideAThread.cs

示例2: Serialize

            public byte[] Serialize()
            {
                var _SerializationWriter = new SerializationWriter();
                _SerializationWriter.WriteString(Message);

                return _SerializationWriter.ToArray();
            }
开发者ID:TheByte,项目名称:sones,代码行数:7,代码来源:NDatabaseMisc.cs

示例3: Serialize

            public Byte[] Serialize()
            {
                var _SerializationWriter = new SerializationWriter();

                _SerializationWriter.WriteString(ObjectLocation);
                _SerializationWriter.WriteByte(NewDefaultRule);

                return _SerializationWriter.ToArray();
            }
开发者ID:TheByte,项目名称:sones,代码行数:9,代码来源:NAccessControl_DefaultRuleChanged.cs

示例4: Serialize

        private void Serialize(ref SerializationWriter mySerializationWriter, DirectoryEntry myDirectoryEntry)
        {
            try
            {

                #region Write the InlineData

                mySerializationWriter.Write(myDirectoryEntry._InlineData);

                #endregion

                #region Write the INodePositions

                mySerializationWriter.WriteUInt32((UInt32)myDirectoryEntry.INodePositions.Count);

                foreach (var _ExtendedPosition in myDirectoryEntry.INodePositions)
                {
                    _ExtendedPosition.StorageUUID.Serialize(ref mySerializationWriter);
                    mySerializationWriter.WriteUInt64(_ExtendedPosition.Position);
                }

                #endregion

                #region Write the ObjectStreamsList

                mySerializationWriter.WriteUInt32((UInt32)myDirectoryEntry.ObjectStreamsList.Count);

                foreach (var _ObjectStreamType in myDirectoryEntry.ObjectStreamsList)
                    mySerializationWriter.WriteString(_ObjectStreamType);

                #endregion

                myDirectoryEntry.isDirty = false;

            }

            catch (SerializationException e)
            {
                throw new SerializationException(e.Message);
            }
        }
开发者ID:ipbi,项目名称:sones,代码行数:41,代码来源:DirectoryEntry.cs

示例5: Serialize

        private byte[] Serialize(ref SerializationWriter mySerializationWriter, ADBSettingsBase myValue)
        {
            #region Write Basics

            try
            {
                if (myValue != null)
                {
                    mySerializationWriter.WriteString(myValue.Name);
                    mySerializationWriter.WriteString(myValue.Description);
                    mySerializationWriter.WriteObject(myValue.OwnerID);
                    myValue.Type.Serialize(ref mySerializationWriter);
                    mySerializationWriter.WriteObject(myValue.Default.Value);
                    mySerializationWriter.WriteObject(myValue._Value.Value);

                    _isDirty = false;
                }
                else
                {
                    mySerializationWriter.WriteString(Name);
                    mySerializationWriter.WriteString(Description);
                    mySerializationWriter.WriteObject(myValue.OwnerID);
                    myValue.Type.Serialize(ref mySerializationWriter);
                    mySerializationWriter.WriteObject(Default.Value);
                    mySerializationWriter.WriteObject(_Value.Value);
                }
            }
            catch (SerializationException e)
            {
                throw new SerializationException(e.Message);
            }

            #endregion

            return mySerializationWriter.ToArray();
        }
开发者ID:TheByte,项目名称:sones,代码行数:36,代码来源:ADBSettingsBase.cs

示例6: Serialize

            public Byte[] Serialize()
            {
                var _SerializationWriter = new SerializationWriter();

                _SerializationWriter.WriteString(ObjectLocation.ToString());
                _SerializationWriter.WriteString(ObjectStream);
                _SerializationWriter.WriteString(ObjectEdition);
                _SerializationWriter.WriteString(ObjectRevisionID.ToString());

                return _SerializationWriter.ToArray();
            }
开发者ID:TheByte,项目名称:sones,代码行数:11,代码来源:NObjectStored.cs

示例7: Serialize

        public override void Serialize(ref SerializationWriter mySerializationWriter)
        {
            try
            {
                mySerializationWriter.WriteString(_ContentType);
                mySerializationWriter.Write(_ObjectData);
            }

            catch (SerializationException e)
            {
                throw new SerializationException(e.Message);
            }
        }
开发者ID:ipbi,项目名称:sones,代码行数:13,代码来源:FileObject.cs

示例8: Serialize

 public void Serialize(ref SerializationWriter mySerializationWriter)
 {
     mySerializationWriter.WriteString(TypeName);
 }
开发者ID:loubo,项目名称:sones,代码行数:4,代码来源:AUserdefinedDataType.cs

示例9: Serialize

            public byte[] Serialize()
            {
                var _SerializationWriter = new SerializationWriter();
                _SerializationWriter.WriteString(ObjectLocation);
                _SerializationWriter.WriteType(TypeOfCacheEntry);

                return _SerializationWriter.ToArray();
            }
开发者ID:TheByte,项目名称:sones,代码行数:8,代码来源:NObjectCache_MissingCacheItem.cs

示例10: Serialize

            public byte[] Serialize()
            {
                var _SerializationWriter = new SerializationWriter();
                _SerializationWriter.WriteString(ObjectLocation);
                _SerializationWriter.WriteString(UserMetadataKey);
                _SerializationWriter.WriteInt32(NumberOfRevisions);

                return _SerializationWriter.ToArray();
            }
开发者ID:TheByte,项目名称:sones,代码行数:9,代码来源:NFileSystem_NumberOfRevisionsReached.cs

示例11: Serialize

        public override void Serialize(ref SerializationWriter mySerializationWriter)
        {
            if (mySerializationWriter != null)
            {

                try
                {

                    ParentTypeUUID.Serialize(ref mySerializationWriter);
                    mySerializationWriter.WriteBoolean(_IsUserDefined);
                    mySerializationWriter.WriteBoolean(_IsAbstract);
                    mySerializationWriter.WriteString(_Comment);

                    mySerializationWriter.WriteUInt32((UInt32)_Attributes.Count);

                    foreach (var pValPair in _Attributes)
                    {
                        pValPair.Key.Serialize(ref mySerializationWriter);
                        pValPair.Value.Serialize(ref mySerializationWriter);
                    }

                    mySerializationWriter.WriteUInt32((UInt32)_TypeSettings.Count);

                    foreach (var pValPair in _TypeSettings)
                        mySerializationWriter.WriteObject(pValPair.Value);

                    mySerializationWriter.WriteUInt32((UInt32)_UniqueAttributes.Count);

                    foreach (var pValPair in _UniqueAttributes)
                        pValPair.Serialize(ref mySerializationWriter);

                    mySerializationWriter.WriteUInt32((UInt32)_MandatoryAttributes.Count);

                    foreach (var pValPair in _MandatoryAttributes)
                        pValPair.Serialize(ref mySerializationWriter);

                    mySerializationWriter.WriteUInt16((UInt16)ObjectDirectoryShards);

                    #region Indices

                    mySerializationWriter.WriteUInt32((UInt32)_AttributeIndices.Count);

                    foreach (var idx in _AttributeIndices)
                    {
                        idx.Key.Serialize(ref mySerializationWriter);

                        mySerializationWriter.WriteUInt32((UInt32)idx.Value.Count);
                        foreach (var idxType in idx.Value)
                        {
                            mySerializationWriter.WriteString(idxType.Key);
                            mySerializationWriter.WriteString(idxType.Value.FileSystemLocation.ToString());
                            mySerializationWriter.WriteString(idxType.Value.IndexEdition);
                            mySerializationWriter.WriteString(idxType.Value.IndexName);
                            mySerializationWriter.WriteString(idxType.Value.IndexType);
                            mySerializationWriter.WriteBoolean(idxType.Value is UUIDIndex);
                            mySerializationWriter.WriteUInt64(idxType.Value.GetKeyCount());
                            mySerializationWriter.WriteUInt64(idxType.Value.GetValueCount());
                            mySerializationWriter.WriteUInt16(idxType.Value.AttributeIdxShards);
                        }
                    }

                    #endregion

                }

                catch (Exception e)
                {
                    throw new SerializationException("The GraphDBType could not be serialized!\n\n" + e);
                }

            }
        }
开发者ID:TheByte,项目名称:sones,代码行数:72,代码来源:GraphDBType.cs

示例12: Serialize

            public Byte[] Serialize()
            {
                var writer = new SerializationWriter();

                writer.WriteString(ObjectLocation);
                RightUUID.Serialize(ref writer);
                EntitiyUUID.Serialize(ref writer);

                return writer.ToArray();
            }
开发者ID:TheByte,项目名称:sones,代码行数:10,代码来源:NAccessControl_AllowACL_EntityAdded.cs

示例13: Serialize

 private void Serialize(ref SerializationWriter mySerializationWriter, DBString myValue)
 {
     mySerializationWriter.WriteString((String)myValue.Value);
 }
开发者ID:TheByte,项目名称:sones,代码行数:4,代码来源:DBString.cs

示例14: Serialize

            public Byte[] Serialize()
            {
                SerializationWriter writer = new SerializationWriter();

                writer.WriteString(ServiceGlobalUniqueName);
                writer.WriteString(ServiceUri.ToString());
                writer.WriteByte((Byte)ServiceType);

                return writer.ToArray();
            }
开发者ID:TheByte,项目名称:sones,代码行数:10,代码来源:NSD_StorageEngine.cs

示例15: Serialize

            public byte[] Serialize()
            {
                var _SerializationWriter = new SerializationWriter();
                _SerializationWriter.WriteString(ObjectLocation);
                _SerializationWriter.WriteType(GraphObjectType);

                return _SerializationWriter.ToArray();
            }
开发者ID:TheByte,项目名称:sones,代码行数:8,代码来源:NFileSystem_PandoraObjectChanged.cs


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