public WriteElementString ( string localName, String value ) : void | ||
localName | string | |
value | String | |
Résultat | void |
private static void WriteAlbum(XmlWriter writer, string albumTitle, string artist) { writer.WriteStartElement("album"); writer.WriteElementString("title", albumTitle); writer.WriteElementString("artist", artist); writer.WriteEndElement(); }
internal override void WriteTo(XmlWriter xml) { if (xml == null) return; xml.WriteComment(SR.GetString(SR.ServiceNameFromClient)); xml.WriteElementString("ServiceName", this.serviceBindingNameSentByClient); xml.WriteComment(SR.GetString(SR.ServiceNameOnService)); xml.WriteStartElement("ServiceNameCollection"); if (this.serviceNameCollectionConfiguredOnServer == null || this.serviceNameCollectionConfiguredOnServer.Count < 1) { xml.WriteElementString("ServiceName", this.defaultServiceBindingNameOfServer); } else { foreach (string serviceName in this.serviceNameCollectionConfiguredOnServer) { xml.WriteElementString("ServiceName", serviceName); } } xml.WriteFullEndElement(); }
public override void ToXml(XmlWriter xwriter) { xwriter.WriteStartElement("IirFilter"); xwriter.WriteElementString("CoefA", Util.ArrayToString(this.CoefA)); xwriter.WriteElementString("CoefB", Util.ArrayToString(this.CoefB)); xwriter.WriteEndElement(); }
public void WriteXml(XmlWriter writer) { writer.WriteStartElement("LogProperty"); writer.WriteElementString("PropertyName", PropertyName); writer.WriteElementString("PropertyValue", PropertyValue); writer.WriteEndElement(); }
private void InsertNode(XmlWriter writer, Item item) { if (item.IsNamespaced) { writer.WriteStartElement(item.LocalName, item.Namespace); } else { writer.WriteStartElement(item.LocalName); } foreach (Item.AttributeNode attr in item.Attributes) { if (attr.IsNamespaced) { writer.WriteStartAttribute(attr.LocalName, attr.Namespace); writer.WriteAttributeString(attr.LocalName, attr.Namespace, attr.Value); } else { writer.WriteStartAttribute(attr.LocalName); writer.WriteAttributeString(attr.LocalName, attr.Value); } writer.WriteEndAttribute(); } if (item.HasContent) { if (item.IsNamespaced) { writer.WriteElementString(item.LocalName, item.Namespace, item.LocalValue.ToString()); } else { writer.WriteElementString(item.LocalName, item.LocalValue.ToString()); } } if (item.HasChildren) { foreach (Item child in item.Children) { InsertNode(writer, child); } } writer.WriteEndElement(); }
/// <summary> /// Creates XML elements from the data of the system. /// </summary> /// <param name="xmlWriter">Object with the XML message to add new information and return to client side</param> /// <param name="val">Value to be puted inside the XML message</param> /// <param name="dtdVersion">Version of the DTD that follows the XML message</param> /// <param name="xmlElement">Element of the XML that is checked</param> public static void ON2XML(XmlWriter xmlWriter, ONReal val, double dtdVersion, string xmlElement) { if (val == null) { if (xmlElement == ONXml.XMLTAG_V) xmlWriter.WriteElementString(xmlElement, ""); else xmlWriter.WriteElementString(ONXml.XMLTAG_NULL, null); } else { if (dtdVersion < 2.0) // Apply the locale format xmlWriter.WriteElementString(xmlElement, val.TypedValue.ToString("0.##############")); else { xmlWriter.WriteStartElement(xmlElement); if (xmlElement == ONXml.XMLTAG_OIDFIELD && dtdVersion > 2.0) xmlWriter.WriteAttributeString("Type", "real"); string lValue = Pack(val); xmlWriter.WriteString(lValue); xmlWriter.WriteEndElement(); } } }
public void ToVcxprojProperties(XmlWriter writer) { if (!String.IsNullOrEmpty(TypeLibraryFile)) writer.WriteElementString("TypeLibraryFile", TypeLibraryFile); if (!String.IsNullOrEmpty(ComponentFileName)) writer.WriteElementString("ComponentFileName", ComponentFileName); }
// Write just the body (InnerXml) of a new item public static void WriteItemBody(XmlWriter w, string title, string content, System.Uri link, DateTime time) { w.WriteElementString("title", title); if (link != null) { w.WriteElementString("link", link.ToString()); } w.WriteElementString("description", content); // this will escape w.WriteElementString("pubDate", ConvertDate(time)); }
/// <summary> /// Creates XML elements from the data of the system. /// </summary> /// <param name="xmlWriter">Object with the XML message to add new information and return to client side</param> /// <param name="val">Value to be puted inside the XML message</param> /// <param name="dtdVersion">Version of the DTD that follows the XML message</param> /// <param name="xmlElement">Element of the XML that is checked</param> public static void ON2XML(XmlWriter xmlWriter, ONDateTime val, double dtdVersion, string xmlElement) { if (val == null) { if (xmlElement == ONXml.XMLTAG_V) xmlWriter.WriteElementString(xmlElement, ""); else xmlWriter.WriteElementString(ONXml.XMLTAG_NULL, null); } else { if (dtdVersion < 2.0) // Apply the locale format xmlWriter.WriteElementString(xmlElement, val.TypedValue.ToString()); else { xmlWriter.WriteStartElement(xmlElement); if (xmlElement == ONXml.XMLTAG_OIDFIELD && dtdVersion > 2.0) xmlWriter.WriteAttributeString("Type", "datetime"); if (val.TypedValue.Millisecond == 0) xmlWriter.WriteString(val.TypedValue.ToString("yyyy-MM-ddTHH:mm:ss")); else xmlWriter.WriteString(val.TypedValue.ToString("yyyy-MM-ddTHH:mm:ss.fff")); xmlWriter.WriteEndElement(); } } }
public void Save(object obj, XmlWriter writer) { Type t = obj.GetType(); // writer.WriteStartElement(GetTypeName(t)); // System.Console.WriteLine("\tSave <{0}>",GetTypeName(t)); writer.WriteStartElement(obj.GetType().Name); PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(obj); PropertyInfo [] propertyInfos = new PropertyInfo[properties.Count]; for (int i = 0;i < properties.Count ; i ++){ propertyInfos[i] = t.GetProperty(properties[i].Name); } foreach (PropertyInfo info in propertyInfos) { if (info == null){ continue; } if (!info.CanRead) continue; if (info.GetCustomAttributes(typeof(XmlIgnoreAttribute), true).Length != 0) continue; object val = info.GetValue(obj, null); if (val == null) continue; if (val is ICollection) { // PropertyInfo pinfo = t.GetProperty(info.Name); // Console.WriteLine("pinfo {0}",pinfo.Name); if (info.Name.StartsWith("Contr")) { writer.WriteStartElement("Items"); } else { writer.WriteStartElement(info.Name); } foreach (object element in (ICollection)val) { Save(element, writer); } writer.WriteEndElement(); } else { if (!info.CanWrite) continue; TypeConverter c = TypeDescriptor.GetConverter(info.PropertyType); if (c.CanConvertFrom(typeof(string)) && c.CanConvertTo(typeof(string))) { try { writer.WriteElementString(info.Name, c.ConvertToInvariantString(val)); } catch (Exception ex) { writer.WriteComment(ex.ToString()); } } else if (info.PropertyType == typeof(Type)) { writer.WriteElementString(info.Name, ((Type)val).AssemblyQualifiedName); } else { // System.Diagnostics.Trace.WriteLine("Serialize Pagelayout"); // writer.WriteStartElement(info.Name); // Save(val, writer); // writer.WriteEndElement(); } } } writer.WriteEndElement(); }
internal override void WriteTo(XmlWriter writer) { base.WriteTo(writer); writer.WriteElementString("PeerName", this.peerName); writer.WriteElementString("CloudName", this.cloudName); writer.WriteElementString("Exception", this.exception.ToString()); }
/// <summary> /// Creates XML elements from the data of the system. /// </summary> /// <param name="xmlWriter">Object with the XML message to add new information and return to client side</param> /// <param name="val">Value to be puted inside the XML message</param> /// <param name="dtdVersion">Version of the DTD that follows the XML message</param> /// <param name="xmlElement">Element of the XML that is checked</param> public static void ON2XML(XmlWriter xmlWriter, ONBool val, double dtdVersion, string xmlElement) { if (val == null) { if (xmlElement == ONXml.XMLTAG_V) xmlWriter.WriteElementString(xmlElement, ""); else xmlWriter.WriteElementString(ONXml.XMLTAG_NULL, null); } else { if (dtdVersion < 2.0) // Apply the locale format { if (val.TypedValue) xmlWriter.WriteElementString(xmlElement, "Verdadero"); else xmlWriter.WriteElementString(xmlElement, "Falso"); } else { xmlWriter.WriteStartElement(xmlElement); if (xmlElement == ONXml.XMLTAG_OIDFIELD && dtdVersion > 2.0) xmlWriter.WriteAttributeString("Type", "bool"); if (val.TypedValue) xmlWriter.WriteString("true"); else xmlWriter.WriteString("false"); xmlWriter.WriteEndElement(); } } }
/// <summary> /// Writes the album inner XML. /// </summary> /// <param name="writer">The xml writer.</param> /// <param name="name">The album name.</param> /// <param name="artist">The album artist.</param> private static void WriteAlbumInnerXML(XmlWriter writer, string name, string artist) { writer.WriteStartElement("album"); writer.WriteElementString("name", name); writer.WriteElementString("artist", artist); writer.WriteEndElement(); }
private void AddTracks(IEnumerable<Audio> tracks, XmlWriter writer) { foreach (var track in tracks.OrderBy(i => i.ParentIndexNumber ?? 0) .ThenBy(i => i.IndexNumber ?? 0)) { writer.WriteStartElement("track"); if (track.IndexNumber.HasValue) { writer.WriteElementString("position", track.IndexNumber.Value.ToString(UsCulture)); } if (!string.IsNullOrEmpty(track.Name)) { writer.WriteElementString("title", track.Name); } if (track.RunTimeTicks.HasValue) { var time = TimeSpan.FromTicks(track.RunTimeTicks.Value).ToString(@"mm\:ss"); writer.WriteElementString("duration", time); } writer.WriteEndElement(); } }
/// <summary> /// Writes the section using an XML writer /// </summary> /// <param name="writer">XML writer to use</param> /// <param name="project">The project to generate .csproj for</param> /// <param name="context">Current .csproj generation context</param> public override void Write(XmlWriter writer, Project project, IMSBuildProjectGeneratorContext context) { writer.WriteStartElement("PropertyGroup"); writer.WriteAttributeString("Condition", " '$(Configuration)|$(Platform)' == 'Bari|Bari' "); WriteConfigurationSpecificPart(writer, project); writer.WriteEndElement(); writer.WriteStartElement("PropertyGroup"); // Writing out configuration specific part to the non conditional block as well WriteConfigurationSpecificPart(writer, project); writer.WriteElementString("OutputType", GetOutputType(project.Type)); writer.WriteElementString("AssemblyName", project.Name); writer.WriteElementString("ProjectGuid", projectGuidManagement.GetGuid(project).ToString("B")); CsharpProjectParameters parameters = project.GetInheritableParameters<CsharpProjectParameters, CsharpProjectParametersDef>("csharp"); parameters.FillProjectSpecificMissingInfo(project); parameters.ToCsprojProperties(writer); WriteAppConfig(writer, project); WriteManifest(writer, project); WriteApplicationIcon(writer, project, parameters); writer.WriteEndElement(); }
public override void Write(XmlWriter writer, Project project, IMSBuildProjectGeneratorContext context) { // TODO: merge common code with C# PropertiesSection writer.WriteStartElement("PropertyGroup"); writer.WriteAttributeString("Condition", " '$(Configuration)|$(Platform)' == 'Bari|Bari' "); WriteConfigurationSpecificPart(writer, project); writer.WriteEndElement(); writer.WriteStartElement("PropertyGroup"); WriteConfigurationSpecificPart(writer, project); writer.WriteElementString("OutputType", GetOutputType(project.Type)); writer.WriteElementString("AssemblyName", project.Name); writer.WriteElementString("ProjectGuid", projectGuidManagement.GetGuid(project).ToString("B")); FsharpProjectParameters parameters = project.HasParameters("fsharp") ? project.GetParameters<FsharpProjectParameters>("fsharp") : new FsharpProjectParameters(Suite); parameters.FillProjectSpecificMissingInfo(project); parameters.ToFsprojProperties(writer); writer.WriteEndElement(); }
public void WriteXml(XmlWriter writer) { string namespaceUrl = string.Empty; foreach (var mapping in _mappings) { writer.WriteStartElement(mapping.GetType().Name); writer.WriteElementString(DataLoaderConstants.TableColumnsMetadataColumn, mapping.Column); writer.WriteElementString(DataLoaderConstants.TableColumnsMetadataColumnSemantic, mapping.ColumnSemantic); if (mapping.ColumnSemantic == string.Empty) { if (!ValidateNamespace(mapping.ColumnNamespace)) mapping.ColumnNamespace = "ogdi=ogdiUrl"; if (mapping.ColumnNamespace.Contains('"')) namespaceUrl = mapping.ColumnNamespace.Replace("\"", ""); else namespaceUrl = mapping.ColumnNamespace; writer.WriteElementString(DataLoaderConstants.TableColumnsMetadataColumnNamespace, namespaceUrl); writer.WriteElementString(DataLoaderConstants.TableColumnsMetadataColumnDescription, mapping.ColumnDescription); } else { namespaceUrl = ReadNamespace(mapping.ColumnSemantic); writer.WriteElementString(DataLoaderConstants.TableColumnsMetadataColumnNamespace, namespaceUrl); writer.WriteElementString(DataLoaderConstants.TableColumnsMetadataColumnDescription, ""); } writer.WriteEndElement(); } }
public void WriteXml(XmlWriter writer) { writer.WriteStartElement("key"); writer.WriteElementString("fifths", Fifths.ToInvariantString()); writer.WriteElementString("mode", Mode.ToLowerInvariantString()); writer.WriteEndElement(); }
internal override void WriteXml(XmlWriter writer, SyndicationItem item) { writer.WriteStartElement(ItemName, ItemNamespace); writer.WriteElementString("id", item.Id); WriteXml(writer, item.Title, "title"); WriteXml(writer, item.Summary, "summary"); DateTime defDate = new DateTime(0); if (item.PublishDate != defDate) { string date = item.PublishDate.ToUniversalTime().ToString("s"); writer.WriteElementString("published", date + "Z"); } if (item.LastUpdatedTime != defDate) { string date = item.LastUpdatedTime.ToUniversalTime().ToString("s"); writer.WriteElementString("updated", date + "Z"); } WriteXml(writer, item.Content, "content"); WriteXml(writer, item.Copyright, "rights"); writer.WriteEndElement(); }
public void WriteXml(XmlWriter writer) { writer.WriteElementString("api-key", ApiKey); if (RecipeID.HasValue) { writer.WriteElementString("recipe-id", RecipeID.Value.ToString()); } if (RecipeName != null) { writer.WriteElementString("recipe-name", RecipeName); } if (NotificationUrl != null) { writer.WriteElementString("notification-url", NotificationUrl); } if (PassThrough != null) { writer.WriteElementString("pass-through", PassThrough); } if (CuePoints.Event.Count > 0 || CuePoints.Navigation.Count > 0) { writer.WriteStartElement("cue-points"); CuePoints.WriteXml(writer); writer.WriteEndElement(); } writer.WriteStartElement("file-locations"); Locations.WriteXml(writer); writer.WriteEndElement(); }
public void CycleModels(XmlWriter writer, int Car_ID) { var ModelSelect = wbTest.Document.GetElementById("model_id"); // get model select mshtml.HTMLSelectElement AllModels = ModelSelect.DomElement as mshtml.HTMLSelectElement; // all items in mark select string menu = string.Empty; foreach (HtmlElement OptionMark in ModelSelect.Children) { if (OptionMark.InnerText != "---Модел---" && OptionMark.InnerText != "---Избери Модел---") { writer.WriteStartElement("Models"); writer.WriteElementString("MODEL_ID", Model_ID.ToString()); menu = OptionMark.InnerText; string[] Separator = { " от ", " до " }; string[] ModelData = menu.Split(Separator, StringSplitOptions.RemoveEmptyEntries); writer.WriteElementString("MODEL_NAME", ModelData[0]); if (ModelData.Length > 1) writer.WriteElementString("YEAR_MANUF", ModelData[1].Substring(0,4)); if (ModelData.Length > 2) writer.WriteElementString("YEAR_STOP", ModelData[2].Substring(0,4)); writer.WriteElementString("CAR_ID", Car_ID.ToString()); Model_ID++; writer.WriteEndElement(); } } }
public void WriteElement(IAixmConverter converter, int flow, JObject feature, XmlWriter writer) { var validTime = feature["properties"]["avalibility"]; var type = feature["properties"]["AixmType"]; if (type != null) { if (flow == 0) { writer.WriteStartElement("aixm", "timeSlice", null); writer.WriteStartElement("aixm", type.ToString() + "TimeSlice", null); if (validTime != null) { writer.WriteStartElement("gml", "validTime", null); writer.WriteStartElement("gml", "TimePeriod", null); writer.WriteElementString("gml", "beginPosition", null, ""); writer.WriteElementString("gml", "endPosition", null, ""); writer.WriteEndElement(); writer.WriteEndElement(); } } else { writer.WriteEndElement(); writer.WriteEndElement(); } } }
public static void WriteBook(XmlWriter writer, string title, string author) { writer.WriteStartElement("album"); writer.WriteElementString("name", title); writer.WriteElementString("author", author); writer.WriteEndElement(); }
private void AddExceptionToTraceString(XmlWriter xml, Exception exception) { xml.WriteElementString("ExceptionType", XmlUtility.Encode(exception.GetType().AssemblyQualifiedName)); xml.WriteElementString("Message", XmlUtility.Encode(exception.Message)); xml.WriteElementString("StackTrace", XmlUtility.Encode(StackTraceString(exception))); xml.WriteElementString("ExceptionString", XmlUtility.Encode(exception.ToString())); var exception2 = exception as Win32Exception; if (exception2 != null) { xml.WriteElementString("NativeErrorCode", exception2.NativeErrorCode.ToString("X", CultureInfo.InvariantCulture)); } if ((exception.Data != null) && (exception.Data.Count > 0)) { xml.WriteStartElement("DataItems"); foreach (object obj2 in exception.Data.Keys) { xml.WriteStartElement("Data"); xml.WriteElementString("Key", XmlUtility.Encode(obj2.ToString())); xml.WriteElementString("Value", XmlUtility.Encode(exception.Data[obj2].ToString())); xml.WriteEndElement(); } xml.WriteEndElement(); } if (exception.InnerException != null) { xml.WriteStartElement("InnerException"); AddExceptionToTraceString(xml, exception.InnerException); xml.WriteEndElement(); } }
internal override void WriteTo( XmlWriter writer ) { writer.WriteStartElement( _elementName ); writer.WriteAttributeString( DiagnosticStrings.NamespaceTag, EventId ); writer.WriteStartElement( "Authorize" ); writer.WriteElementString( "Url", _url ); writer.WriteElementString( "Action", _action ); writer.WriteStartElement( "ClaimsPrincipal"); writer.WriteAttributeString( "Identity.Name", _claimsPrincipal.Identity.Name ); foreach ( ClaimsIdentity ci in _claimsPrincipal.Identities ) { writer.WriteStartElement( "ClaimsIdentity" ); writer.WriteAttributeString( "name", ci.Name ); foreach ( Claim c in ci.Claims ) { writer.WriteStartElement( "Claim" ); writer.WriteAttributeString( "Value", c.Value ); writer.WriteAttributeString( "Type", c.Type ); writer.WriteAttributeString( "ValueType", c.ValueType ); writer.WriteEndElement(); } writer.WriteEndElement(); } writer.WriteEndElement(); writer.WriteEndElement(); writer.WriteEndElement(); }
internal override void WriteTo(XmlWriter writer) { base.WriteTo(writer); writer.WriteElementString("MeshId", this.meshId.ToString()); writer.WriteElementString("MessageSource", this.from.ToString()); writer.WriteElementString("Exception", this.exception.Message); }
protected override void WriteCustomElements(IHasMetadata item, XmlWriter writer) { var imdb = item.GetProviderId(MetadataProviders.Imdb); if (!string.IsNullOrEmpty(imdb)) { writer.WriteElementString("id", imdb); } var musicVideo = item as MusicVideo; if (musicVideo != null) { if (!string.IsNullOrEmpty(musicVideo.Artist)) { writer.WriteElementString("artist", musicVideo.Artist); } if (!string.IsNullOrEmpty(musicVideo.Album)) { writer.WriteElementString("album", musicVideo.Album); } } var movie = item as Movie; if (movie != null) { if (!string.IsNullOrEmpty(movie.TmdbCollectionName)) { writer.WriteElementString("set", movie.TmdbCollectionName); } } }
internal override void WriteXml(XmlWriter writer, SyndicationFeed feed) { writer.WriteStartElement(FeedName, FeedNamespace); if (!String.IsNullOrEmpty(feed.Language)) writer.WriteAttributeString("xml:lang", feed.Language); WriteXml(writer, feed.Title, "title", true); writer.WriteElementString("id", feed.Id); WriteXml(writer, feed.Copyright, "rights"); string updated = feed.LastUpdatedTime.ToUniversalTime().ToString("s"); writer.WriteElementString("updated", updated + "Z"); if (feed.ImageUrl != null) writer.WriteElementString("logo", feed.ImageUrl.ToString()); if (!String.IsNullOrEmpty(feed.Generator)) writer.WriteElementString("generator", feed.Generator); WriteXml(writer, feed.Description, "summary"); foreach (SyndicationItem item in feed.Items) { WriteTo(writer, item); } writer.WriteEndElement(); }
internal override void WriteTo(XmlWriter xml) { TraceHelper.WriteTraceSource(xml, this.traceSource); TraceHelper.WriteEnId(xml, this.enTraceId); xml.WriteElementString("EnlistmentType", this.enType.ToString()); xml.WriteElementString("EnlistmentOptions", this.enOptions.ToString()); }
private void WriteEffectContents(EffectInfo effect, XmlWriter writer) { if (!string.IsNullOrWhiteSpace(effect.Name)) writer.WriteAttributeString("name", effect.Name); if (effect.Filter != null) { writer.WriteStartElement("EntityFilter"); if (effect.Filter.Type != null) writer.WriteElementString("Type", effect.Filter.Type); if (effect.Filter.Direction != null) writer.WriteElementString("Direction", effect.Filter.Direction.ToString()); if (effect.Filter.Position != null) { if (effect.Filter.Position.X != null) WriteRangeFilter("X", writer, effect.Filter.Position.X); if (effect.Filter.Position.Y != null) WriteRangeFilter("Y", writer, effect.Filter.Position.Y); } writer.WriteEndElement(); } foreach (var part in effect.Parts) WritePart(part, writer); }
public override void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("underlying_para"); xmlWriter.WriteElementString("type", "hullWhiteOneFactor"); xmlWriter.WriteStartElement("hullWhiteOneFactor"); xmlWriter.WriteElementString("alpha", this.alpha_); xmlWriter.WriteElementString("sigma", this.sigma_); tenorViewModel_.buildXml(xmlWriter); fittingYieldCurveViewModel_.buildXml(xmlWriter); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
public override void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("excel_underlyingModel_para"); xmlWriter.WriteElementString("excel_type", "excel_forwardModel"); xmlWriter.WriteStartElement("excel_forwardModel"); xmlWriter.WriteElementString("currentValue", this.currentValue_); xmlWriter.WriteElementString("tenor", this.tenor_); excel_yieldCurveViewModel_.buildXml(xmlWriter); //xmlWriter.WriteElementString("vba_description", this.vba_description_); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
public void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("iXmlData"); xmlWriter.WriteElementString("type", "excel_interpolation"); xmlWriter.WriteStartElement("excel_interpolation"); xmlWriter.WriteElementString("interpolation", this.interpolation_); xmlWriter.WriteElementString("daycounter", this.daycounter_); xmlWriter.WriteElementString("calendar", this.calendar_); xmlWriter.WriteElementString("businessDayConvention", this.businessDayConvention_); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
public void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("iXmlData"); xmlWriter.WriteElementString("excel_type", "excel_referenceObligation"); xmlWriter.WriteStartElement("excel_referenceObligation"); xmlWriter.WriteElementString("instrumentId", this.instrumentId_); xmlWriter.WriteElementString("couponRate", this.couponRate_); xmlWriter.WriteElementString("maturity", this.maturity_); xmlWriter.WriteElementString("currency", this.currency_); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
public void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("eventCalculationInfo"); if (preConditionEventViewModel_ != null) { preConditionEventViewModel_.buildXml(xmlWriter); } foreach (var item in eventCalculationViewModel_) { item.buildXml(xmlWriter); } if (jointSimpleCalculationViewModel_ != null) { jointSimpleCalculationViewModel_.buildXml(xmlWriter); } xmlWriter.WriteElementString("pastEventOcc", this.pastEventOcc_); if (refVariable_eventOccViewModel_ != null) { refVariable_eventOccViewModel_.buildXml(xmlWriter); } xmlWriter.WriteEndElement(); }
public override void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("eventTrigger"); xmlWriter.WriteElementString("excel_type", "simpleRangeReturnTrigger"); xmlWriter.WriteStartElement("simpleRangeReturnTrigger"); simpleRangeEventCalViewModel_.buildXml(xmlWriter); xmlWriter.WriteElementString("autoCallFlag", this.autoCallFlag_); xmlWriter.WriteElementString("expired", this.expired_); payoffDateInfoViewModel_.buildXml(xmlWriter); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
public void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("iXmlData"); xmlWriter.WriteElementString("excel_type", "excel_result"); xmlWriter.WriteStartElement("excel_result"); xmlWriter.WriteElementString("calculationDate", StringConverter.xmlDateTimeToDateString(this.calculationDate_)); excel_valueResultViewModel_.buildXml(xmlWriter); excel_greekResultViewModel_.buildXml(xmlWriter); excel_cashFlowsResultViewModel_.buildXml(xmlWriter); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
public void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("iXmlData"); xmlWriter.WriteElementString("type", "gbmGreekResult"); xmlWriter.WriteStartElement("gbmGreekResult"); xmlWriter.WriteElementString("underlyingName", this.underlyingName_); xmlWriter.WriteElementString("delta", this.delta_); xmlWriter.WriteElementString("gamma", this.gamma_); xmlWriter.WriteElementString("vega", this.vega_); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
public override void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("excel_kiEventCalculation"); xmlWriter.WriteElementString("excel_type", "excel_targetKiEventCalc"); xmlWriter.WriteStartElement("excel_targetKiEventCalc"); xmlWriter.WriteElementString("eventDate", StringConverter.xmlDateTimeToDateString(this.eventDate_)); xmlWriter.WriteElementString("vba_description", this.vba_description_); xmlWriter.WriteElementString("targetCount", this.targetCount_); excel_eventCalcInfoViewModel_.buildXml(xmlWriter); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
// Use this for initialization void Start() { if (System.IO.File.Exists(configPath) == false) { Xml.XmlWriterSettings settings = new Xml.XmlWriterSettings(); settings.Indent = true; string levelsPath = "Assets/scenes/"; string[] loaderPath = System.IO.Directory.GetFiles(levelsPath); ConfigWriter cfgFile = ConfigWriter.Create(configPath, settings); cfgFile.WriteStartDocument(); cfgFile.WriteStartElement("Config"); cfgFile.WriteStartElement("Levels"); cfgFile.WriteAttributeString("LevelsPath", levelsPath.ToString()); foreach (string file in loaderPath) { if (file.EndsWith(".meta") == false) { cfgFile.WriteElementString("Map", file.Remove(0, levelsPath.Length).Remove(file.Length - (levelsPath.Length + 6)).ToString()); } } cfgFile.WriteEndElement(); cfgFile.WriteEndElement(); cfgFile.WriteEndDocument(); cfgFile.Flush(); cfgFile.Close(); } }
public override void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("excel_parameter"); xmlWriter.WriteElementString("excel_type", "excel_standardHifivePara"); xmlWriter.WriteStartElement("excel_standardHifivePara"); xmlWriter.WriteElementString("referenceDate", this.referenceDate_.ToString(StringFormat.XmlDateFormat_)); xmlWriter.WriteElementString("simulationNum", this.simulationNum_); this.excel_underlyingCalcInfo_paraViewModel_.buildXml(xmlWriter); this.excel_discountCurve_paraViewModel_.buildXml(xmlWriter); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
public override void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("excel_underlyingInfo"); xmlWriter.WriteElementString("excel_type", "excel_stockIndex"); xmlWriter.WriteStartElement("excel_stockIndex"); xmlWriter.WriteElementString("krCode", this.krCode_); xmlWriter.WriteElementString("name", this.name_); xmlWriter.WriteElementString("currency", this.currency_); xmlWriter.WriteElementString("basePrice", this.basePrice_); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
public void WriteXml(System.Xml.XmlWriter writer) { writer.WriteElementString("aggregate", Aggregate.ToString().ToLowerInvariant()); if (Assemblies != null) { writer.WriteStartElement("assemblies"); foreach (var assembly in Assemblies) { writer.WriteStartElement("assembly"); writer.WriteStartAttribute("ref"); writer.WriteString(assembly); writer.WriteEndAttribute(); writer.WriteEndElement(); } writer.WriteEndElement(); } if (Dependencies != null) { writer.WriteStartElement("dependencies"); foreach (var dependency in Dependencies) { writer.WriteStartElement("dependency"); writer.WriteStartAttribute("ref"); writer.WriteString(dependency); writer.WriteEndAttribute(); writer.WriteEndElement(); } writer.WriteEndElement(); } }
public override void Save(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("ConnectFourPiece"); xmlWriter.WriteElementString("IsRed", IsPieceRed.ToString()); base.Save(xmlWriter); xmlWriter.WriteEndElement(); }
public new void WriteXml(System.Xml.XmlWriter writer) { if (null == writer) { return; } writer.WriteElementString("Finger", _finger); writer.WriteElementString("Name", _name); writer.WriteElementString("ServiceObject", _ServiceObject); // Serialize the base class into its own element writer.WriteStartElement("BaseClassData"); base.WriteXml(writer); writer.WriteEndElement(); }
public void WriteXml(System.Xml.XmlWriter writer) { Type instanceType = base.GetType().BaseType; foreach (PropertyInfo Prop in instanceType.GetProperties(BindingFlags.Public | BindingFlags.Instance)) { string value = null; object propertyValue = Prop.GetValue(this, null); if (propertyValue != null) { value = Prop.GetValue(this, null).ToString(); } writer.WriteElementString(Prop.Name, value); } foreach (IFileProcessingJournalEntryData entryData in this.EntryData) { var val = entryData.GetType().GetProperty("Value").GetValue(entryData, null); string name = (string)entryData.GetType().GetProperty("Name").GetValue(entryData, null); string type = (string)entryData.GetType().GetProperty("type").GetValue(entryData, null); var ser = XmlSerializerCache.GetOrAdd(entryData.GetType(), name); ser.Serialize(writer, entryData); } }
public void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("iXmlData"); xmlWriter.WriteElementString("type", "forwardContractInfo"); xmlWriter.WriteStartElement("forwardContractInfo"); xmlWriter.WriteElementString("calculationDate", StringConverter.xmlDateTimeToDateString(this.calculationDate_)); xmlWriter.WriteElementString("settlementDays", this.settlementDays_); xmlWriter.WriteElementString("settlementDate", StringConverter.xmlDateTimeToDateString(this.settlementDate_)); xmlWriter.WriteElementString("forwardPoint", this.forwardPoint_); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
public void WriteXml(System.Xml.XmlWriter writer) { if (writer == null) { throw new ArgumentNullException("writer"); } writer.WriteStartElement("Settings"); writer.WriteAttributeString("Version", CurrentVersion.ToString(CultureInfo.CurrentCulture)); string appName = System.Reflection.Assembly.GetAssembly(this.GetType()).Location; var assemblyName = System.Reflection.AssemblyName.GetAssemblyName(appName); var traceLabVersion = assemblyName.Version.ToString(); writer.WriteElementString("TraceLabVersion", traceLabVersion); s_appSettings.WriteXml(writer); foreach (ExperimentSettings setting in s_experimentSettings.Values) { setting.WriteXml(writer); } writer.WriteEndElement(); // Settings }
public override void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("excel_parameter"); xmlWriter.WriteElementString("type", "excel_standardPara"); xmlWriter.WriteStartElement("excel_standardPara"); xmlWriter.WriteElementString("referenceDate", StringConverter.xmlDateTimeToDateString(this.referenceDate_)); xmlWriter.WriteElementString("simulationNum", this.simulationNum_); excel_underlyingCalcInfo_paraViewModel_.buildXml(xmlWriter); excel_discountCurve_paraViewModel_.buildXml(xmlWriter); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
public void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("iXmlData"); xmlWriter.WriteElementString("excel_type", "protectionTerms"); xmlWriter.WriteStartElement("protectionTerms"); calculationAmountViewModel_.buildXml(xmlWriter); creditEventsViewModel_.buildXml(xmlWriter); obligationsViewModel_.buildXml(xmlWriter); xmlWriter.WriteElementString("accrualCoupon", this.accrualCoupon_); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
public override void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("excel_underlyingModel_para"); xmlWriter.WriteElementString("type", "excel_geometricBM"); xmlWriter.WriteStartElement("excel_geometricBM"); xmlWriter.WriteElementString("currentValue", this.currentValue_); xmlWriter.WriteElementString("drift", this.drift_); xmlWriter.WriteElementString("dividend", this.dividend_); xmlWriter.WriteElementString("volatility", this.volatility_); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
public void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("excel_fixedCouponScheduleList"); //xmlWriter.WriteElementString("scheduleInitialDate" , this.scheduleInitialDate_); xmlWriter.WriteElementString("fixedRate", this.fixedRate_); xmlWriter.WriteElementString("dayCounter", this.dayCounter_); //xmlWriter.WriteElementString("maturityDate" , this.maturityDate_); foreach (var item in this.excel_fixedCouponScheduleViewModel_) { item.buildXml(xmlWriter); } xmlWriter.WriteEndElement(); }
public override void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("excel_underlyingCalcID"); xmlWriter.WriteElementString("excel_type", "excel_minimumUnderlyingCalcID"); xmlWriter.WriteStartElement("excel_minimumUnderlyingCalcID"); foreach (var item in excel_selectedUnderlyingViewModel_) { item.buildXml(xmlWriter); } xmlWriter.WriteElementString("eventDate", StringConverter.xmlDateTimeToDateString(this.eventDate_)); xmlWriter.WriteElementString("averageDays", this.averageDays_); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
public override void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("messageBody"); xmlWriter.WriteElementString("excel_type", "gridCalculationStart"); xmlWriter.WriteStartElement("gridCalculationStart"); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
public override void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("pricingResult"); xmlWriter.WriteElementString("type", "nullResult"); xmlWriter.WriteStartElement("nullResult"); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
public void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("iXmlData"); xmlWriter.WriteElementString("type", "evaluationCurves"); xmlWriter.WriteStartElement("evaluationCurves"); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
public override void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("messageBody"); xmlWriter.WriteElementString("type", "maturityNotification"); xmlWriter.WriteStartElement("maturityNotification"); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
public void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("iXmlData"); xmlWriter.WriteElementString("excel_type", "excel_vanillaFloatingCouponScheduleList"); xmlWriter.WriteStartElement("excel_vanillaFloatingCouponScheduleList"); xmlWriter.WriteElementString("fixedRate", this.fixedRate_); xmlWriter.WriteElementString("dayCounter", this.dayCounter_); foreach (var item in excel_vanillaFloatingCouponScheduleViewModel_) { item.buildXml(xmlWriter); } xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
public override void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("excel_structuredBond_subtype"); xmlWriter.WriteElementString("type", "excel_structuredBond_floatingAccrual"); xmlWriter.WriteStartElement("excel_structuredBond_floatingAccrual"); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }
public override void buildXml(System.Xml.XmlWriter xmlWriter) { xmlWriter.WriteStartElement("eventCalculation"); xmlWriter.WriteElementString("excel_type", "lowerBarrierEventCal"); xmlWriter.WriteStartElement("lowerBarrierEventCal"); foreach (var item in dateInformationViewModel_) { item.buildXml(xmlWriter); } xmlWriter.WriteElementString("lowerTrigger", this.lowerTrigger_); referenceCalculationInfoViewModel_.buildXml(xmlWriter); xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); }