public unsafe void ReadXml(XmlReader reader) { var tl = reader.Deserialize <Position>(); var br = reader.Deserialize <Position>(); fixed(Position *topLeft = &TopLeft) * topLeft = tl; fixed(Position *bottomRight = &BottomRight) * bottomRight = br; }
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; } } } }
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; } } } }
public virtual void ReadXml(XmlReader reader) { if (null == reader) { throw new ArgumentNullException("reader"); } if (reader.IsEmptyElement) { reader.Read(); return; } var name = reader.Name; while (reader.Read()) { if (XmlNodeType.EndElement == reader.NodeType && reader.Name == name) { reader.Read(); break; } while (XmlNodeType.Element == reader.NodeType) { #if NET20 Add(XmlReaderExtensionMethods.Deserialize <T>(reader)); #else Add(reader.Deserialize <T>()); #endif } } }
public void ReadXml(XmlReader reader) { var isEmpty = reader.IsEmptyElement; // Read past the property element reader.Read(); // For an empty list in Settings.Default if (isEmpty) { return; } // Read list items var list = new List <AutoQcConfig>(); while (reader.IsStartElement()) { list.Add(reader.Deserialize(new AutoQcConfig())); reader.Read(); } Clear(); foreach (var config in list) { Add(config); } }
void IXmlSerializable.ReadXml(XmlReader reader) { var blocks = new Dictionary <string, (int x, int y, Size size)>(); while (reader.Read()) { if (reader.NodeType is XmlNodeType.Element) { switch (reader.Name) { case "Header": reader.ReadSubTree(ReadHeader); break; case "Blocks": reader.ReadSubTree(ReadBlocks); break; case "Entities": reader.ReadSubTree(ReadEntities); return; } } } void ReadHeader(XmlReader reader) { var setName = false; var setSize = false; while (!(setName && setSize) && reader.Read()) { if (reader.NodeType is XmlNodeType.Element) { if (reader.Name is nameof(Name)) { var name = reader.ReadElementContentAsString(); Helper.ModifyReadOnlyProperty(() => Name, name); if (setSize) { break; } setName = true; } else if (reader.Name is nameof(Size)) { var size = reader.Deserialize <Size>(); Helper.ModifyReadOnlyProperty(() => Size, size); Helper.ModifyReadOnlyProperty(() => Blocks, new BlockType[Size.Width, Size.Height]); if (setName) { break; } setSize = true; } } } }
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); }
public void OnAttached(Activity activity) { var actionBar = activity.GetActionBar(); if (actionBar == null) { Tracer.Error("Cannot apply ActionBarView the ActionBar is null, activity {0}", activity.GetType().FullName); return; } var activityView = activity as IActivityView; if (activityView != null) { activityView.Mediator.Destroyed += DestroyedHandler; } if (_resourceId != int.MinValue) { if (_tabContentId != int.MinValue) { ServiceProvider.AttachedValueProvider.SetValue(actionBar, ActionBarTemplate.TabContentIdKey, _tabContentId); } object templateObj; if (!TemplateCache.TryGetValue(_resourceId, out templateObj)) { using (XmlReader reader = Context.Resources.GetLayout(_resourceId)) { templateObj = reader.Deserialize <ActionBarTemplate>(); TemplateCache[_resourceId] = templateObj; } } ((ActionBarTemplate)templateObj).Apply(activity); } if (string.IsNullOrEmpty(_bind)) { return; } BindingServiceProvider.BindingProvider.CreateBindingsFromString(actionBar, _bind, null); this.ClearBindingsRecursively(true, true, AndroidToolkitExtensions.AggressiveViewCleanup); this.RemoveFromParent(); }
public static RCalcIrt Deserialize(XmlReader reader) { return(reader.Deserialize(new RCalcIrt())); }
public static AnnotationExpression Deserialize(XmlReader reader) { return(reader.Deserialize(new AnnotationExpression())); }
public static MeasuredIon Deserialize(XmlReader reader) { return(reader.Deserialize(new MeasuredIon())); }
public static SrmSettings Deserialize(XmlReader reader) { return reader.Deserialize(new SrmSettings()); }
public static PeptideModifications Deserialize(XmlReader reader) { return reader.Deserialize(new PeptideModifications()); }
public new static BackgroundProteome Deserialize(XmlReader reader) { return(reader.Deserialize(new BackgroundProteome())); }
public static SpectrastLibrary Deserialize(XmlReader reader) { return(reader.Deserialize(new SpectrastLibrary())); }
public static MProphetPeakScoringModel Deserialize(XmlReader reader) { return reader.Deserialize(new MProphetPeakScoringModel()); }
// ReSharper restore MemberHidesStaticFromOuterClass // ReSharper disable MemberHidesStaticFromOuterClass public static FeatureCalculator Deserialize(XmlReader reader) { return reader.Deserialize(new FeatureCalculator()); }
public static PeptideLibraries Deserialize(XmlReader reader) { return reader.Deserialize(new PeptideLibraries()); }
public static PeptideIntegration Deserialize(XmlReader reader) { return reader.Deserialize(new PeptideIntegration(null)); }
public static PeptideSettings Deserialize(XmlReader reader) { return reader.Deserialize(new PeptideSettings()); }
public static PeptidePrediction Deserialize(XmlReader reader) { return reader.Deserialize(new PeptidePrediction()); }
public static PeptideFilter Deserialize(XmlReader reader) { return reader.Deserialize(new PeptideFilter()); }
public static IsotopeEnrichments Deserialize(XmlReader reader) { return(reader.Deserialize(new IsotopeEnrichments())); }
public static ReportSpec Deserialize(XmlReader reader) { return(reader.Deserialize(new ReportSpec())); }
public static IonMobilityLibrary Deserialize(XmlReader reader) { return reader.Deserialize(new IonMobilityLibrary()); }
public static LegacyScoringModel Deserialize(XmlReader reader) { return(reader.Deserialize(new LegacyScoringModel())); }
public static Enzyme Deserialize(XmlReader reader) { return reader.Deserialize(new Enzyme()); }
public static XHunterLibrary Deserialize(XmlReader reader) { return(reader.Deserialize(new XHunterLibrary())); }
public static PeptideExcludeRegex Deserialize(XmlReader reader) { return reader.Deserialize(new PeptideExcludeRegex()); }
public static DigestSettings Deserialize(XmlReader reader) { return reader.Deserialize(new DigestSettings()); }
public static MeasuredIon Deserialize(XmlReader reader) { return reader.Deserialize(new MeasuredIon()); }
public static IsotopeEnrichments Deserialize(XmlReader reader) { return reader.Deserialize(new IsotopeEnrichments()); }
public static FragmentLoss Deserialize(XmlReader reader) { return reader.Deserialize(new FragmentLoss()); }
public static ChromLibSpectrumHeaderInfo Deserialize(XmlReader reader) { return(reader.Deserialize(new ChromLibSpectrumHeaderInfo())); }
public static RetentionTimeSource Deserialize(XmlReader reader) { return reader.Deserialize(new RetentionTimeSource()); }
public static IsolationScheme Deserialize(XmlReader reader) { return(reader.Deserialize(new IsolationScheme())); }
public static StaticMod Deserialize(XmlReader reader) { return reader.Deserialize(new StaticMod()); }
public static ToolDescription Deserialize(XmlReader reader) { return(reader.Deserialize(new ToolDescription())); }
public static BiblioSpecSpectrumHeaderInfo Deserialize(XmlReader reader) { return reader.Deserialize(new BiblioSpecSpectrumHeaderInfo()); }
// ReSharper disable MemberHidesStaticFromOuterClass public static FeatureCalculator Deserialize(XmlReader reader) // ReSharper restore MemberHidesStaticFromOuterClass { return(reader.Deserialize(new FeatureCalculator())); }
public static BiblioSpecSpectrumHeaderInfo Deserialize(XmlReader reader) { return(reader.Deserialize(new BiblioSpecSpectrumHeaderInfo())); }
public static SpectrastSpectrumHeaderInfo Deserialize(XmlReader reader) { return(reader.Deserialize(new SpectrastSpectrumHeaderInfo())); }
public static BiblioSpecLibSpec Deserialize(XmlReader reader) { return reader.Deserialize(new BiblioSpecLibSpec()); }
public static SpectrastSpec Deserialize(XmlReader reader) { return(reader.Deserialize(new SpectrastSpec())); }
public static LegacyScoringModel Deserialize(XmlReader reader) { return reader.Deserialize(new LegacyScoringModel()); }
public static ChromatogramLibrarySpec Deserialize(XmlReader reader) { return(reader.Deserialize(new ChromatogramLibrarySpec())); }
public static MProphetPeakScoringModel Deserialize(XmlReader reader) { return(reader.Deserialize(new MProphetPeakScoringModel())); }
public static XHunterSpectrumHeaderInfo Deserialize(XmlReader reader) { return(reader.Deserialize(new XHunterSpectrumHeaderInfo())); }
public static IsolationScheme Deserialize(XmlReader reader) { return reader.Deserialize(new IsolationScheme()); }
public static ProgramPathContainer Deserialize(XmlReader reader) { return(reader.Deserialize(new ProgramPathContainer())); }
public static BackgroundProteomeSpec Deserialize(XmlReader reader) { return reader.Deserialize(new BackgroundProteomeSpec()); }
public static BiblioSpecLibrary Deserialize(XmlReader reader) { return(reader.Deserialize(new BiblioSpecLibrary())); }
public static OptimizationLibrary Deserialize(XmlReader reader) { return reader.Deserialize(new OptimizationLibrary()); }
public static OptimizationLibrary Deserialize(XmlReader reader) { return(reader.Deserialize(new OptimizationLibrary())); }
public static ChromatogramSet Deserialize(XmlReader reader) { return reader.Deserialize(new ChromatogramSet()); }
public static DocumentRetentionTimes Deserialize(XmlReader reader) { return(reader.Deserialize(new DocumentRetentionTimes())); }
public static RCalcIrt Deserialize(XmlReader reader) { return reader.Deserialize(new RCalcIrt()); }
public static FragmentLoss Deserialize(XmlReader reader) { return(reader.Deserialize(new FragmentLoss())); }
public static IsolationWindow Deserialize(XmlReader reader) { return reader.Deserialize(new IsolationWindow()); }