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


C# XmlReader.Deserialize方法代码示例

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


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

示例1: ArgumentNullException

        void IXmlSerializable.ReadXml(XmlReader reader)
        {
            if (null == reader)
            {
                throw new ArgumentNullException("reader");
            }

            if (reader.IsEmptyElement)
            {
                reader.Read();
                return;
            }

            var name = reader.Name;
            while (reader.Read())
            {
#if NET20
                if (XmlReaderExtensionMethods.IsEndElement(reader, name))
#else
                if (reader.IsEndElement(name))
#endif
                {
                    reader.Read();
                    break;
                }

                while (XmlNodeType.Element == reader.NodeType)
                {
                    switch (reader.Name)
                    {
                        case "directories":
#if NET20
                            Directories = XmlReaderExtensionMethods.Deserialize<DirectoryCollection>(reader);
#else
                            Directories = reader.Deserialize<DirectoryCollection>();
#endif
                            break;
                        case "files":
#if NET20
                            Files = XmlReaderExtensionMethods.Deserialize<FileCollection>(reader);
#else
                            Files = reader.Deserialize<FileCollection>();
#endif
                            break;
                    }
                }
            }
        }
开发者ID:KarlDirck,项目名称:cavity,代码行数:48,代码来源:Paths.cs

示例2: Start

    void Start()
    {
        fileLoader = new FileLoader();
        xmlReader = new XmlReader();
        dialogue = new DialogueReader();
        textSpoken.text = "";

        string data = fileLoader.Load("TestDialogue.xml");

        Dialogue d = xmlReader.Deserialize<Dialogue>(data) as Dialogue;

        dialogue.SetDialogue(d);
    }
开发者ID:caseydedore,项目名称:DialogueXML,代码行数:13,代码来源:Game.cs

示例3: Deserialize

 public static MProphetPeakScoringModel Deserialize(XmlReader reader)
 {
     return reader.Deserialize(new MProphetPeakScoringModel());
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:4,代码来源:MProphetScoringModel.cs

示例4: Deserialize

 public static Enzyme Deserialize(XmlReader reader)
 {
     return reader.Deserialize(new Enzyme());
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:4,代码来源:Enzyme.cs

示例5: Deserialize

 public static IsotopeEnrichments Deserialize(XmlReader reader)
 {
     return reader.Deserialize(new IsotopeEnrichments());
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:4,代码来源:IsotopeEnrichments.cs

示例6: Deserialize

 public static IsolationScheme Deserialize(XmlReader reader)
 {
     return reader.Deserialize(new IsolationScheme());
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:4,代码来源:IsolationScheme.cs

示例7: Deserialize

 public static StaticMod Deserialize(XmlReader reader)
 {
     return reader.Deserialize(new StaticMod());
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:4,代码来源:Modification.cs

示例8: Deserialize

 public static BiblioSpecSpectrumHeaderInfo Deserialize(XmlReader reader)
 {
     return reader.Deserialize(new BiblioSpecSpectrumHeaderInfo());
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:4,代码来源:BiblioSpec.cs

示例9: Deserialize

 public static PeptideFilter Deserialize(XmlReader reader)
 {
     return reader.Deserialize(new PeptideFilter());
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:4,代码来源:PeptideSettings.cs

示例10: Deserialize

 public static FragmentLoss Deserialize(XmlReader reader)
 {
     return reader.Deserialize(new FragmentLoss());
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:4,代码来源:Loss.cs

示例11: Deserialize

 public static BackgroundProteomeSpec Deserialize(XmlReader reader)
 {
     return reader.Deserialize(new BackgroundProteomeSpec());
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:4,代码来源:BackgroundProteomeSpec.cs

示例12: Deserialize

 // ReSharper restore MemberHidesStaticFromOuterClass
 // ReSharper disable MemberHidesStaticFromOuterClass
 public static FeatureCalculator Deserialize(XmlReader reader)
 {
     return reader.Deserialize(new FeatureCalculator());
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:6,代码来源:FeatureCalculator.cs

示例13: Deserialize

 public static IonMobilityLibrary Deserialize(XmlReader reader)
 {
     return reader.Deserialize(new IonMobilityLibrary());
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:4,代码来源:IonMobilityLibrary.cs

示例14: Deserialize

 public static MeasuredIon Deserialize(XmlReader reader)
 {
     return reader.Deserialize(new MeasuredIon());
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:4,代码来源:MeasuredIon.cs

示例15: Deserialize

 public static OptimizationLibrary Deserialize(XmlReader reader)
 {
     return reader.Deserialize(new OptimizationLibrary());
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:4,代码来源:OptimizationLibrary.cs


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