Exemplo n.º 1
0
 public System.Xml.XmlNode Generate(XCRI.Interfaces.XCRICAP11.IProvider provider)
 {
     return(this._GetGeneratedNode((w) =>
     {
         this.XmlGenerator.Write(w, provider);
     }));
 }
Exemplo n.º 2
0
 public void Write
 (
     System.Xml.XmlWriter xmlWriter,
     XCRI.Interfaces.XCRICAP11.IProvider provider
 )
 {
     if (provider == null)
     {
         throw new ArgumentNullException("provider");
     }
     if ((provider.CompatibleWith & XCRIProfiles.XCRI_v1_1) == 0)
     {
         return;
     }
     this._WriteStartElement(xmlWriter, "provider", Configuration.Namespaces.XCRICAP11NamespaceUri);
     if (
         (provider.Identifiers.Count == 0)
         &&
         (provider.Url != null)
         )
     {
         provider.Identifiers.Add(new Identifier()
         {
             Value = provider.Url.ToString()
         });
     }
     if (provider.ReferenceNumber.HasValue)
     {
         Identifier ident = new Identifier()
         {
             Value = provider.ReferenceNumber.Value.ToString()
         };
         ident.XsiTypeValue          = "ukprn";
         ident.XsiTypeValueNamespace = Configuration.Namespaces.UKRegisterOfLearningProvidersNamespaceUri;
         provider.Identifiers.Add(ident);
     }
     this.WriteXCRI11OrganisationItem(xmlWriter, (XCRI.Interfaces.XCRICAP11.IOrganisation)provider);
     foreach (XCRI.Interfaces.ICourse course in provider.Courses)
     {
         this.Write(xmlWriter, course);
     }
     this._WriteEndElement(xmlWriter);
 }