• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# DocumentObject类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中DocumentObject的典型用法代码示例。如果您正苦于以下问题:C# DocumentObject类的具体用法?C# DocumentObject怎么用?C# DocumentObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DocumentObject类属于命名空间,在下文中一共展示了DocumentObject类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetValue

    /// <summary>
    /// Gets the object specified by name from dom.
    /// </summary>
    public object GetValue(DocumentObject dom, string name, GV flags)
    {
      int dot = name.IndexOf('.');
      if (dot == 0)
        throw new ArgumentException(DomSR.InvalidValueName(name));
      string trail = null;
      if (dot > 0)
      {
        trail = name.Substring(dot + 1);
        name = name.Substring(0, dot);
      }
      ValueDescriptor vd = this.vds[name];
      if (vd == null)
        throw new ArgumentException(DomSR.InvalidValueName(name));

      object value = vd.GetValue(dom, flags);
      if (value == null && flags == GV.GetNull)  //??? oder auch GV.ReadOnly?
        return null;

      //REVIEW DaSt: Sollte beim GV.ReadWrite das Objekt angelegt werden?
      if (trail != null)
      {
        if (value == null || trail == "")
          throw new ArgumentException(DomSR.InvalidValueName(name));
        DocumentObject doc = value as DocumentObject;
        if (doc == null)
          throw new ArgumentException(DomSR.InvalidValueName(name));
        value = doc.GetValue(trail, flags);
      }
      return value;
    }
开发者ID:GorelH,项目名称:PdfSharp,代码行数:34,代码来源:Meta.cs


示例2: GetValue

        /// <summary>
        /// Gets the object specified by name from dom.
        /// </summary>
        public object GetValue(DocumentObject dom, string name, GV flags)
        {
            int dot = name.IndexOf('.');
            if (dot == 0)
                throw new ArgumentException(DomSR.InvalidValueName(name));
            string trail = null;
            if (dot > 0)
            {
                trail = name.Substring(dot + 1);
                name = name.Substring(0, dot);
            }
            ValueDescriptor vd = _vds[name];
            if (vd == null)
                throw new ArgumentException(DomSR.InvalidValueName(name));

            object value = vd.GetValue(dom, flags);
            if (value == null && flags == GV.GetNull)  //??? also for GV.ReadOnly?
                return null;

            //REVIEW DaSt: Create object in case of GV.ReadWrite?
            if (trail != null)
            {
                if (value == null || trail == "")
                    throw new ArgumentException(DomSR.InvalidValueName(name));
                DocumentObject doc = value as DocumentObject;
                if (doc == null)
                    throw new ArgumentException(DomSR.InvalidValueName(name));
                value = doc.GetValue(trail, flags);
            }
            return value;
        }
开发者ID:Sl0vi,项目名称:MigraDoc,代码行数:34,代码来源:Meta.cs


示例3: Cell

 /// <summary>
 /// Initializes a new instance of the Cell class with the specified parent.
 /// </summary>
 internal Cell(DocumentObject parent) : base(parent) { }
开发者ID:vronikp,项目名称:EventRegistration,代码行数:4,代码来源:Cell.cs


示例4: IsNull

 /// <summary>
 /// Determines whether the given DocumentObject is null (not set).
 /// </summary>
 public override bool IsNull(DocumentObject dom)
 {
   DocumentObjectCollection val = FieldInfo.GetValue(dom) as DocumentObjectCollection;
   if (val == null)
     return true;
   return val.IsNull();
 }
开发者ID:GorelH,项目名称:PdfSharp,代码行数:10,代码来源:ValueDescriptor.cs


示例5: PageRefField

 /// <summary>
 /// Initializes a new instance of the PageRefField class with the specified parent.
 /// </summary>
 internal PageRefField(DocumentObject parent) : base(parent) { }
开发者ID:GorelH,项目名称:PdfSharp,代码行数:4,代码来源:PageRefField.cs


示例6: NumericFieldBase

 /// <summary>
 /// Initializes a new instance of the NumericFieldBase class with the specified parent.
 /// </summary>
 internal NumericFieldBase(DocumentObject parent)
     : base(parent)
 {
 }
开发者ID:dankennedy,项目名称:MigraDoc,代码行数:7,代码来源:NumericFieldBase.cs


示例7: XValues

 /// <summary>
 /// Initializes a new instance of the XValues class with the specified parent.
 /// </summary>
 internal XValues(DocumentObject parent)
     : base(parent)
 {
 }
开发者ID:dankennedy,项目名称:MigraDoc,代码行数:7,代码来源:XValues.cs


示例8: Row

 /// <summary>
 /// Initializes a new instance of the Row class with the specified parent.
 /// </summary>
 internal Row(DocumentObject parent) : base(parent) { }
开发者ID:DavidS,项目名称:MigraDoc,代码行数:4,代码来源:Row.cs


示例9: SeriesElements

 /// <summary>
 /// Initializes a new instance of the SeriesElements class with the specified parent.
 /// </summary>
 internal SeriesElements(DocumentObject parent)
     : base(parent)
 {
 }
开发者ID:dankennedy,项目名称:MigraDoc,代码行数:7,代码来源:SeriesElements.cs


示例10: SetNull

    /// <summary>
    /// Sets the member of dom specified by name to null.
    /// If a member with the specified name does not exist an ArgumentException will be thrown.
    /// </summary>
    public void SetNull(DocumentObject dom, string name)
    {
      ValueDescriptor vd = vds[name];
      if (vd == null)
        throw new ArgumentException(DomSR.InvalidValueName(name));

      vd.SetNull(dom);
    }
开发者ID:GorelH,项目名称:PdfSharp,代码行数:12,代码来源:Meta.cs


示例11: IsNull

    /// <summary>
    /// Determines whether the member of dom specified by name is null.
    /// If a member with the specified name does not exist an ArgumentException will be thrown.
    /// </summary>
    public virtual bool IsNull(DocumentObject dom, string name)
    {
      //bool isNull = false;
      int dot = name.IndexOf('.');
      if (dot == 0)
        throw new ArgumentException(DomSR.InvalidValueName(name));
      string trail = null;
      if (dot > 0)
      {
        trail = name.Substring(dot + 1);
        name = name.Substring(0, dot);
      }
      ValueDescriptor vd = this.vds[name];
      if (vd == null)
        throw new ArgumentException(DomSR.InvalidValueName(name));

      if (vd is NullableDescriptor || vd is ValueTypeDescriptor)
      {
        if (trail != null)
          throw new ArgumentException(DomSR.InvalidValueName(name));
        return vd.IsNull(dom);
      }
      DocumentObject docObj = (DocumentObject)vd.GetValue(dom, GV.ReadOnly);
      if (docObj == null)
        return true;
      if (trail != null)
        return docObj.IsNull(trail);
      else
        return docObj.IsNull();

      //      DomValueDescriptor vd = vds[name];
      //      if (vd == null)
      //        throw new ArgumentException(DomSR.InvalidValueName(name));
      //      
      //      return vd.IsNull(dom);
    }
开发者ID:GorelH,项目名称:PdfSharp,代码行数:40,代码来源:Meta.cs


示例12: SetValue

    /// <summary>
    /// Sets the member of dom specified by name to val.
    /// If a member with the specified name does not exist an ArgumentException will be thrown.
    /// </summary>
    public void SetValue(DocumentObject dom, string name, object val)
    {
      int dot = name.IndexOf('.');
      if (dot == 0)
        throw new ArgumentException(DomSR.InvalidValueName(name));
      string trail = null;
      if (dot > 0)
      {
        trail = name.Substring(dot + 1);
        name = name.Substring(0, dot);
      }
      ValueDescriptor vd = this.vds[name];
      if (vd == null)
        throw new ArgumentException(DomSR.InvalidValueName(name));

      if (trail != null)
      {
        //REVIEW DaSt: dom.GetValue(name) und rekursiv SetValue aufrufen,
        //             oder dom.GetValue(name.BisVorletzteElement) und erst SetValue aufrufen.
        DocumentObject doc = dom.GetValue(name) as DocumentObject;
        doc.SetValue(trail, val);
      }
      else
        vd.SetValue(dom, val);
    }
开发者ID:GorelH,项目名称:PdfSharp,代码行数:29,代码来源:Meta.cs


示例13: SetNull

 public abstract void SetNull(DocumentObject dom);
开发者ID:GorelH,项目名称:PdfSharp,代码行数:1,代码来源:ValueDescriptor.cs


示例14: SetValue

 public abstract void SetValue(DocumentObject dom, object val);
开发者ID:GorelH,项目名称:PdfSharp,代码行数:1,代码来源:ValueDescriptor.cs


示例15: GetValue

 public abstract object GetValue(DocumentObject dom, GV flags);
开发者ID:GorelH,项目名称:PdfSharp,代码行数:1,代码来源:ValueDescriptor.cs


示例16: Barcode

 /// <summary>
 /// Initializes a new instance of the Barcode class with the specified parent.
 /// </summary>
 internal Barcode(DocumentObject parent) : base(parent) { }
开发者ID:Sl0vi,项目名称:MigraDoc,代码行数:4,代码来源:Barcode.cs


示例17: Column

 /// <summary>
 /// Initializes a new instance of the Column class with the specified parent.
 /// </summary>
 internal Column(DocumentObject parent) : base(parent) { }
开发者ID:DavidS,项目名称:MigraDoc,代码行数:4,代码来源:Column.cs


示例18: PictureFormat

 /// <summary>
 /// Initializes a new instance of the PictureFormat class with the specified parent.
 /// </summary>
 internal PictureFormat(DocumentObject parent)
     : base(parent)
 {
 }
开发者ID:dankennedy,项目名称:MigraDoc,代码行数:7,代码来源:PictureFormat.cs


示例19: GetMeta

 /// <summary>
 /// Gets the meta object of the specified document object.
 /// </summary>
 /// <param name="documentObject">The document object the meta is returned for.</param>
 public static Meta GetMeta(DocumentObject documentObject)
 {
   return documentObject.Meta;
 }
开发者ID:GorelH,项目名称:PdfSharp,代码行数:8,代码来源:Meta.cs


示例20: ChartObject

 /// <summary>
 /// Initializes a new instance of the ChartObject class with the specified parent.
 /// </summary>
 internal ChartObject(DocumentObject parent) : base(parent) { }
开发者ID:Sl0vi,项目名称:MigraDoc,代码行数:4,代码来源:ChartObject.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# DocumentRange类代码示例发布时间:2022-05-24
下一篇:
C# DocumentId类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap