static void Main(string[] args) { Console.WriteLine("Qicktime ATOM Parser in .NET"); var atom = AtomParser.parseAtoms(new FileInfo("Aa.mov")); printAtomTree(atom, ""); Console.WriteLine("Press any key to continue..."); Console.ReadKey(); }
/// <summary> /// Interpreta los datos de un archivo XML /// </summary> public AtomChannel Parse(MLFile fileML) { AtomChannel channel = ParseRSS(fileML); // Si no se ha cargado desde un archivo RSS, se carga desde un archivo RDF if (channel == null) { channel = ParseRDF(fileML); } // Si no se ha cargado desde un archivo RSS, se carga desde un archivo Atom if (channel == null) { channel = new AtomParser().Parse(fileML); } // Devuelve los datos return(channel); }
#pragma warning restore 649 #endregion Private fields. internal MaterializeAtom(DataServiceContext context, XmlReader reader, QueryComponents queryComponents, ProjectionPlan plan, MergeOption mergeOption) { Debug.Assert(queryComponents != null, "queryComponents != null"); this.context = context; this.elementType = queryComponents.LastSegmentType; this.MergeOptionValue = mergeOption; this.ignoreMissingProperties = context.IgnoreMissingProperties; this.reader = (reader == null) ? null : new Microsoft.WindowsAzure.Samples.Data.Services.Client.Xml.XmlAtomErrorReader(reader); this.countValue = CountStateInitial; this.expectingSingleValue = ClientConvert.IsKnownNullableType(this.elementType); Debug.Assert(reader != null, "Materializer reader is null! Did you mean to use Materializer.ResultsWrapper/EmptyResults?"); reader.Settings.NameTable.Add(context.DataNamespace); string typeScheme = this.context.TypeScheme.OriginalString; this.parser = new AtomParser(this.reader, AtomParser.XElementBuilderCallback, typeScheme, context.DataNamespace); AtomMaterializerLog log = new AtomMaterializerLog(this.context, mergeOption); Type implementationType; Type materializerType = GetTypeForMaterializer(this.expectingSingleValue, this.elementType, out implementationType); this.materializer = new AtomMaterializer(this.parser, context, materializerType, this.ignoreMissingProperties, mergeOption, log, this.MaterializedObjectCallback, queryComponents, plan); }