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


C# SerializationReader.ReadStringArray方法代码示例

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


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

示例1: Index

        /// <exclude/>
        public Index(SerializationInfo serializationInfo, StreamingContext streamingContext)
        {
            if (SerializerHelper.UseFastSerialization)
            {
                _columns = null;

                using (SerializationReader reader = new SerializationReader((byte[])serializationInfo.GetValue("d", typeof(byte[]))))
                {
                    UniqueId = reader.ReadString();
                    Lookups.Add(UniqueId, this);
                    _alias = reader.ReadString();
                    _columnIds = reader.ReadStringArray();
                    _enabled = reader.ReadBoolean();
                    _isUserDefined = reader.ReadBoolean();
                    _name = reader.ReadString();
                    // TODO: Parent
                    _type = reader.ReadString();
                    _userOptions = (List<IUserOption>)reader.ReadObject();
                }
            }
            else
            {
                int version = 0;

                if (SerializationVersionExists)
                {
                    try
                    {
                        version = serializationInfo.GetInt32("SerializationVersion");
                    }
                    catch (SerializationException)
                    {
                        // ignore
                        SerializationVersionExists = false;
                    }
                }
                _alias = serializationInfo.GetString("Alias");
                _columns = (List<Column>)serializationInfo.GetValue("Columns", ModelTypes.ColumnList);
                _enabled = serializationInfo.GetBoolean("Enabled");
                //this._exposedUserOptions = serializationInfo.GetValue("ExposedUserOptions", ModelTypes.Object);
                _isUserDefined = serializationInfo.GetBoolean("IsUserDefined");
                _name = serializationInfo.GetString("Name");
                _parent = (ScriptObject)serializationInfo.GetValue("Parent", ModelTypes.ScriptObject);
                _type = serializationInfo.GetString("Type");
                _userOptions = (List<IUserOption>)serializationInfo.GetValue("UserOptions", ModelTypes.UserOptionList);

                for (int i = 0; i < _userOptions.Count; i++)
                {
                    _userOptions[i].Owner = this;
                }
                if (version >= 8)
                {
                    _description = serializationInfo.GetString("Description");
                }
            }
        }
开发者ID:uQr,项目名称:Visual-NHibernate,代码行数:57,代码来源:Index.cs

示例2: OneToManyRelationship

        /// <exclude/>
        public OneToManyRelationship(SerializationInfo serializationInfo, StreamingContext streamingContext)
        {
            if (SerializerHelper.UseFastSerialization)
            {
                _foreignColumns = null;

                using (SerializationReader reader = new SerializationReader((byte[])serializationInfo.GetValue("d", typeof(byte[]))))
                {
                    UniqueId = reader.ReadString();
                    Lookups.Add(UniqueId, this);
                    _alias = reader.ReadString();
                    _enabled = reader.ReadBoolean();
                    _filterId = reader.ReadString();
                    _ForeignColumnIds = reader.ReadStringArray();
                    _ForeignRelationshipId = reader.ReadString();
                    _ForeignScriptObjectId = reader.ReadString();
                    _isUserDefined = reader.ReadBoolean();
                    _name = reader.ReadString();
                    // TODO: Parent
                    string[] primaryColumnIds = reader.ReadStringArray();

                    foreach (string primaryColumnId in primaryColumnIds)
                    {
                        _primaryColumns.Add((Column)Lookups[primaryColumnId]);
                    }
                    // TODO: PrimaryScriptObject
                    _userOptions = (List<IUserOption>)reader.ReadObject();

                    for (int i = 0; i < _userOptions.Count; i++)
                    {
                        _userOptions[i].Owner = this;
                    }
                }
            }
            else
            {
                int version = 0;

                if (SerializationVersionExists)
                {
                    try
                    {
                        version = serializationInfo.GetInt32("SerializationVersion");
                    }
                    catch (SerializationException)
                    {
                        // ignore
                        SerializationVersionExists = false;
                    }
                }
                _alias = serializationInfo.GetString("Alias");
                _enabled = serializationInfo.GetBoolean("Enabled");
                //_exposedUserOptions = serializationInfo.GetValue("ExposedUserOptions", ModelTypes.Object);
                _filter = (Filter)serializationInfo.GetValue("Filter", ModelTypes.Filter);
                _foreignColumns = (List<Column>)serializationInfo.GetValue("ForeignColumns", ModelTypes.ColumnList);
                _foreignRelationship = (Relationship)serializationInfo.GetValue("ForeignRelationship", ModelTypes.Relationship);
                _foreignScriptObject = (ScriptObject)serializationInfo.GetValue("ForeignScriptObject", ModelTypes.ScriptObject);
                _isUserDefined = serializationInfo.GetBoolean("IsUserDefined");
                _name = serializationInfo.GetString("Name");
                _parent = (ScriptObject)serializationInfo.GetValue("Parent", ModelTypes.ScriptObject);
                _primaryColumns = (List<Column>)serializationInfo.GetValue("PrimaryColumns", ModelTypes.ColumnList);
                _primaryScriptObject = (ScriptObject)serializationInfo.GetValue("PrimaryScriptObject", ModelTypes.ScriptObject);
                _userOptions = (List<IUserOption>)serializationInfo.GetValue("UserOptions", ModelTypes.UserOptionList);

                if (version >= 8)
                {
                    _description = serializationInfo.GetString("Description");
                }
            }
        }
开发者ID:uQr,项目名称:Visual-NHibernate,代码行数:71,代码来源:OneToManyRelationship.cs

示例3: MapColumn

        /// <exclude/>
        public MapColumn(SerializationInfo serializationInfo, StreamingContext streamingContext)
        {
            if (SerializerHelper.UseFastSerialization)
            {
                _relationshipPath = null;

                using (SerializationReader reader = new SerializationReader((byte[])serializationInfo.GetValue("d", typeof(byte[]))))
                {
                    UniqueId = reader.ReadString();
                    Lookups.Add(UniqueId, this);
                    _alias = reader.ReadString();
                    _aliasDisplay = reader.ReadString();
                    _characterMaximumLength = reader.ReadInt32();
                    // TODO: CurrentParent
                    _dataType = reader.ReadString();
                    _default = reader.ReadString();
                    _enabled = reader.ReadBoolean();
                    _foreignColumnId = reader.ReadString();
                    _inPrimaryKey = reader.ReadBoolean();
                    _isIdentity = reader.ReadBoolean();
                    _isNullable = reader.ReadBoolean();
                    _isUserDefined = reader.ReadBoolean();
                    _name = reader.ReadString();
                    _ordinalPosition = reader.ReadInt32();
                    // TODO: Parent
                    _readOnly = reader.ReadBoolean();
                    _RelationshipPathIds = reader.ReadStringArray();
                    _userOptions = (List<IUserOption>)reader.ReadObject();

                    for (int i = 0; i < _userOptions.Count; i++)
                    {
                        _userOptions[i].Owner = this;
                    }
                }
            }
            else
            {
                _IsMapColumn = true;
                int version = 0;

                if (SerializationVersionExists)
                {
                    try
                    {
                        version = serializationInfo.GetInt32("SerializationVersion");
                    }
                    catch (SerializationException)
                    {
                        // ignore
                        SerializationVersionExists = false;
                    }
                }
                _alias = serializationInfo.GetString("Alias");
                _aliasDisplay = serializationInfo.GetString("AliasDisplay");
                _characterMaximumLength = serializationInfo.GetInt32("CharacterMaximumLength");
                _currentParent = (ScriptObject)serializationInfo.GetValue("CurrentParent", ModelTypes.ScriptObject);
                _dataType = serializationInfo.GetString("DataType");
                _default = serializationInfo.GetString("Default");
                _enabled = serializationInfo.GetBoolean("Enabled");
                //_exposedUserOptions = serializationInfo.GetValue("ExposedUserOptions", ModelTypes.Object);
                _foreignColumn = (Column)serializationInfo.GetValue("ForeignColumn", ModelTypes.Column);
                _inPrimaryKey = serializationInfo.GetBoolean("InPrimaryKey");
                _isIdentity = serializationInfo.GetBoolean("IsIdentity");
                _isNullable = serializationInfo.GetBoolean("IsNullable");
                _isUserDefined = serializationInfo.GetBoolean("IsUserDefined");
                _name = serializationInfo.GetString("Name");
                _ordinalPosition = serializationInfo.GetInt32("OrdinalPosition");
                _parent = (ScriptObject)serializationInfo.GetValue("Parent", ModelTypes.ScriptObject);
                _readOnly = serializationInfo.GetBoolean("ReadOnly");
                _relationshipPath = (Relationship[])serializationInfo.GetValue("RelationshipPath", ModelTypes.RelationshipArray);
                _userOptions = (List<IUserOption>)serializationInfo.GetValue("UserOptions", ModelTypes.UserOptionList);

                if (version >= 8)
                {
                    _description = serializationInfo.GetString("Description");
                }
            }
        }
开发者ID:uQr,项目名称:Visual-NHibernate,代码行数:79,代码来源:MapColumn.cs


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