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


C# Context.getStyle方法代码示例

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


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

示例1: CompositeMap

 /// <summary>
 /// Constructor for the <c>CompositeMap</c> object. This will
 /// create a converter that is capable of writing map objects to
 /// and from XML. The resulting XML is configured by an annotation
 /// such that key values can attributes and values can be inline.
 /// </summary>
 /// <param name="context">
 /// this is the root context for the serialization
 /// </param>
 /// <param name="entry">
 /// this provides configuration for the resulting XML
 /// </param>
 /// <param name="type">
 /// this is the map type that is to be converted
 /// </param>
 public CompositeMap(Context context, Entry entry, Type type) {
    this.factory = new MapFactory(context, type);
    this.value = entry.GetValue(context);
    this.key = entry.GetKey(context);
    this.style = context.getStyle();
    this.entry = entry;
 }
开发者ID:ngallagher,项目名称:simplexml,代码行数:22,代码来源:CompositeMap.cs

示例2: GetEntry

 /// <summary>
 /// This is used to either provide the entry value provided within
 /// the annotation or compute a entry value. If the entry string
 /// is not provided the the entry value is calculated as the type
 /// of primitive the object is as a simplified class name.
 /// </summary>
 /// <param name="context">
 /// this is the context used to style the entry
 /// </param>
 /// <returns>
 /// this returns the name of the XML entry element used
 /// </returns>
 public String GetEntry(Context context) {
    Style style = context.getStyle();
    String entry = GetEntry();
    return style.getElement(entry);
 }
开发者ID:ngallagher,项目名称:simplexml,代码行数:17,代码来源:ElementArrayLabel.cs

示例3: GetName

 /// <summary>
 /// This is used to acquire the name of the element or attribute
 /// that is used by the class schema. The name is determined by
 /// checking for an override within the annotation. If it contains
 /// a name then that is used, if however the annotation does not
 /// specify a name the the field or method name is used instead.
 /// </summary>
 /// <param name="context">
 /// this is the context used to style the name
 /// </param>
 /// <returns>
 /// returns the name that is used for the XML property
 /// </returns>
 public String GetName(Context context) {
    Style style = context.getStyle();
    String name = detail.GetName();
    return style.getElement(name);
 }
开发者ID:ngallagher,项目名称:simplexml,代码行数:18,代码来源:ElementArrayLabel.cs

示例4: GetName

 /// <summary>
 /// This is used to acquire the name of the element or attribute
 /// that is used by the class schema. The name is determined by
 /// checking for an override within the annotation. If it contains
 /// a name then that is used, if however the annotation does not
 /// specify a name the the field or method name is used instead.
 /// </summary>
 /// <param name="context">
 /// this is the context used to style the name
 /// </param>
 /// <returns>
 /// returns the name that is used for the XML property
 /// </returns>
 public String GetName(Context context) {
    Style style = context.getStyle();
    String name = entry.Entry;
    if(!label.inline()) {
       name = detail.GetName();
    }
    return style.getElement(name);
 }
开发者ID:ngallagher,项目名称:simplexml,代码行数:21,代码来源:ElementMapLabel.cs


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