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

C# IDocumentAccessor类代码示例

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

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



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

示例1: Initialise

        public void Initialise(XElement xElement, IDocumentAccessor accessor)
        {
            xElement = Persistence.ThisOrSingleChild(XName, xElement);

            var identity = Persistence.Identity.Parse(xElement, accessor);

            SetIdentity(identity);

            var xComponentType = xElement
                .Elements("ComponentType")
                .SingleOrDefault();

            ComponentType.Initialise(xComponentType, accessor);

            var xEngineType = xElement
                .Elements("EngineType")
                .SingleOrDefault();

            EngineType.Initialise(xEngineType, accessor);

            UseNativeEngine = Utilities.Xml.GetAttribute(xElement, "useNativeEngine", false);

            Arguments = Persistence.Arguments
                .Parse(xElement, accessor)
                .ToList();

            Inputs = Persistence.Inputs
                .Parse(xElement, accessor)
                .ToList();

            Outputs = Persistence.Outputs
                .Parse(xElement, accessor)
                .ToList();
        }
开发者ID:CNH-Hyper-Extractive,项目名称:parallel-sdk,代码行数:34,代码来源:ComponentState.cs


示例2: Initialise

        public void Initialise(XElement xElement, IDocumentAccessor accessor)
        {
            xElement = Persistence.ThisOrSingleChild(XName, xElement);

            ISpatialDefinition spatial;
            bool hasZ, hasM;
            ElementType = Persistence.ElementSet.Parse(xElement, accessor, out spatial, out hasZ, out hasM);
            SetSpatial(spatial);
            HasZ = hasZ;
            HasM = hasM;

            string relative = xElement.Value;

            var uri = new Uri(accessor.Uri, relative);

            var selafin = new FileInfo(uri.LocalPath);

            Selafin = new Selafin(selafin);

               var argIdSelafin =  Utilities.Xml.GetAttribute(xElement, "argIdSelafin");

               Arguments = new IArgument[] {
                new ArgumentFile(new Identity(argIdSelafin, "Selafin file"), selafin),
                }.ToList();

            Initialise();
        }
开发者ID:CNH-Hyper-Extractive,项目名称:parallel-sdk,代码行数:27,代码来源:ElementSetSelafinBase.cs


示例3: Persist

 public XElement Persist(IDocumentAccessor accessor)
 {
     return new XElement(Component.NamespaceOpenMIv2 + "Argument",
         new XAttribute("Key", Key),
         new XAttribute("Value", Value),
         new XAttribute("ReadOnly", ReadOnly));
 }
开发者ID:CNH-Hyper-Extractive,项目名称:parallel-sdk,代码行数:7,代码来源:Omi.cs


示例4: Indent

 public void Indent(IDocumentAccessor document, bool keepEmptyLines)
 {
     if (document == null)
     {
         throw new ArgumentNullException("document");
     }
 }
开发者ID:123marvin123,项目名称:PawnPlus,代码行数:7,代码来源:IndentationStrategy.cs


示例5: Reformat

        public void Reformat(IDocumentAccessor doc, IndentationSettings settings)
        {
            Init();

            while (doc.MoveNext())
                Step(doc, settings);
        }
开发者ID:Zolniu,项目名称:DigitalRune,代码行数:7,代码来源:CSharpIndentationReformatter.cs


示例6: Persist

 public override XElement Persist(IDocumentAccessor accessor)
 {
     return new XElement("Category",
         new XAttribute("type", _value.GetType().ToString()),
         new XAttribute("value", _value.ToString()),
         base.Persist(accessor));
 }
开发者ID:CNH-Hyper-Extractive,项目名称:parallel-sdk,代码行数:7,代码来源:Category.cs


示例7: Category

        public Category(XElement xElement, IDocumentAccessor accessor)
            : base(xElement.Elements("Describes").Single(), accessor)
        {
            Utilities.Xml.ValidElement(xElement, "Category");

            Type type = Type.GetType(Utilities.Xml.GetAttribute(xElement, "type"));
            _value = Convert.ChangeType(Utilities.Xml.GetAttribute(xElement, "value"), type);
        }
开发者ID:CNH-Hyper-Extractive,项目名称:parallel-sdk,代码行数:8,代码来源:Category.cs


示例8: Initialise

            public void Initialise(XElement xElement, IDocumentAccessor accessor)
            {
                Contract.Requires(xElement != null, "xElement != null");

                Key = Utilities.Xml.GetAttribute(xElement, "Key");
                Value = Utilities.Xml.GetAttribute(xElement, "Value");
                ReadOnly = Utilities.Xml.GetAttribute(xElement, "ReadOnly", false);
            }
开发者ID:CNH-Hyper-Extractive,项目名称:parallel-sdk,代码行数:8,代码来源:Omi.cs


示例9: Initialise

        public override void Initialise(string initialisingXml, IDocumentAccessor accessor)
        {
            base.Initialise(initialisingXml, accessor);

            _caption = ArgumentCaption;

            _timeDelta = (double)Argument(SimpleComponent.GetArgumentIdentity(
                SimpleComponent.ConsumerArgs.TimeDelta)).Value;
        }
开发者ID:CNH-Hyper-Extractive,项目名称:parallel-sdk,代码行数:9,代码来源:SimpleEngine.cs


示例10: Initialise

        /// <summary>
        /// Simple implementation of interface FluidEarth2.Sdk.Interfaces.IEngine::Initialise()
        /// 
        /// Overide if specific additional functionality required.
        /// </summary>
        /// <param name="initialisingXml">See FluidEarth2.Sdk.BaseEngine</param>
        /// <param name="accessor">See FluidEarth2.Sdk.BaseEngine</param>
        public override void Initialise(string initialisingXml, IDocumentAccessor accessor)
        {
            base.Initialise(initialisingXml, accessor);

            _horizon = new Time(ArgumentTimeHorizon);
            _timeCurrent = _horizon.StampAsModifiedJulianDay;

            if (double.IsNegativeInfinity(_timeCurrent))
                throw new Exception("Time horizon start is unbounded");
        }
开发者ID:CNH-Hyper-Extractive,项目名称:parallel-sdk,代码行数:17,代码来源:BaseEngineTime.cs


示例11: Indent

		/// <summary>
		/// Performs indentation using the specified document accessor.
		/// </summary>
		/// <param name="document">Object used for accessing the document line-by-line</param>
		/// <param name="keepEmptyLines">Specifies whether empty lines should be kept</param>
		public void Indent(IDocumentAccessor document, bool keepEmptyLines)
		{
			if (document == null)
				throw new ArgumentNullException("document");
			IndentationSettings settings = new IndentationSettings();
			settings.IndentString = this.IndentationString;
			settings.LeaveEmptyLines = keepEmptyLines;
			
			IndentationReformatter r = new IndentationReformatter();
			r.Reformat(document, settings);
		}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:16,代码来源:CSharpIndentationStrategy.cs


示例12: Initialise

        public virtual void Initialise(XElement xElement, IDocumentAccessor accessor)
        {
            xElement = Persistence.ThisOrSingleChild(XName, xElement);

            ISpatialDefinition spatial;
            bool hasZ, hasM;
            ElementType = Persistence.ElementSet.Parse(xElement, accessor, out spatial, out hasZ, out hasM);
            SetSpatial(spatial);
            HasZ = hasZ;
            HasM = hasM;
        }
开发者ID:CNH-Hyper-Extractive,项目名称:parallel-sdk,代码行数:11,代码来源:ElementSetProposed.cs


示例13: Initialise

        public override void Initialise(XElement xElement, IDocumentAccessor accessor)
        {
            xElement = Persistence.ThisOrSingleChild(XName, xElement);

            base.Initialise(xElement, accessor);

            IndexMap = xElement
                .Elements("Indexes")
                .Select(x => Persistence.Values<int>.Parse(x, accessor))
                .ToArray();
        }
开发者ID:CNH-Hyper-Extractive,项目名称:parallel-sdk,代码行数:11,代码来源:ElementSetVerticesUniqueIndexed.cs


示例14: Initialise

        public void Initialise(XElement xElement, IDocumentAccessor accessor)
        {
            xElement = Persistence.ThisOrSingleChild(XName, xElement);

            Identity = Persistence.Identity.Parse(xElement, accessor);
            ValueDefinition = Persistence.ValueDefinition.Parse(xElement, accessor);
            SpatialDefinition = Persistence.SpatialDefinition.Parse(xElement, accessor);
            TimeSet = Persistence.TimeSet.Parse(xElement, accessor);

            Component = null;
            Provider = null;
        }
开发者ID:CNH-Hyper-Extractive,项目名称:parallel-sdk,代码行数:12,代码来源:OrphanedInputSpaceTime.cs


示例15: Indent

        /// <summary>
        /// Performs indentation using the specified document accessor.
        /// </summary>
        /// <param name="document">Object used for accessing the document line-by-line</param>
        /// <param name="indentationString">The string used for indentation.</param>
        /// <param name="keepEmptyLines">Specifies whether empty lines should be kept</param>
        private void Indent(IDocumentAccessor document, string indentationString, bool keepEmptyLines)
        {
            if (document == null)
                throw new ArgumentNullException(nameof(document));

            IndentationSettings settings = new IndentationSettings();
            settings.IndentString = indentationString;
            settings.LeaveEmptyLines = keepEmptyLines;

            CSharpIndentationReformatter r = new CSharpIndentationReformatter();
            r.Reformat(document, settings);
        }
开发者ID:Zolniu,项目名称:DigitalRune,代码行数:18,代码来源:CSharpIndentationStrategy.cs


示例16: Indent

		/// <summary>
		///     Performs indentation using the specified document accessor.
		/// </summary>
		/// <param name="document">Object used for accessing the document line-by-line</param>
		/// <param name="keepEmptyLines">Specifies whether empty lines should be kept</param>
		public int Indent(IDocumentAccessor document, bool keepEmptyLines, int caretOffset)
		{
			if (document == null)
				throw new ArgumentNullException("document");
			var settings = new IndentationSettings();
			settings.IndentString = IndentationString;
			settings.LeaveEmptyLines = keepEmptyLines;

			var r = new IndentationReformatter();
			r.Reformat(document, settings);
			return caretOffset;
		}
开发者ID:VitalElement,项目名称:AvalonStudio,代码行数:17,代码来源:CSharpIndentationStrategy.cs


示例17: Initialise

        public override void Initialise(XElement xElement, IDocumentAccessor accessor)
        {
            xElement = Persistence.ThisOrSingleChild(XName, xElement);

            base.Initialise(xElement, accessor);

            Ids = xElement
                .Elements(Persistence.Identity.XName)
                .Select(i => Persistence.Identity.Parse(i, accessor))
                .ToArray();

            ElementCount = Ids.Length;
        }
开发者ID:CNH-Hyper-Extractive,项目名称:parallel-sdk,代码行数:13,代码来源:ElementSetIds.cs


示例18: Indent

 public void Indent(IDocumentAccessor document, bool keepEmptyLines)
 {
     if (document == null)
     {
         throw new ArgumentNullException("document");
     }
     var set = new IndentationSettings
     {
         IndentString = IndentationString,
         LeaveEmptyLines = keepEmptyLines
     };
     var indentationClass = new IndentationClass();
     indentationClass.Reformat(document, set);
 }
开发者ID:mookiejones,项目名称:miEditor,代码行数:14,代码来源:IndentationStrategy.cs


示例19: Initialise

        public virtual void Initialise(XElement xElement, IDocumentAccessor accessor)
        {
            xElement = Persistence.ThisOrSingleChild(XName, xElement);

            Identity = Persistence.Identity.Parse(xElement, accessor);
            ValueDefinition = Persistence.ValueDefinition.Parse(xElement, accessor);
            SpatialDefinition = Persistence.SpatialDefinition.Parse(xElement, accessor);
            TimeSet = Persistence.TimeSet.Parse(xElement, accessor);

            Component = null;
            Provider = null;

            _valueSetConverterTime = Persistence.Parse<IValueSetConverterTime>("ValueSetConverterTime", xElement, accessor);
            _valueSetConverterTime.ExchangeItem = this;
        }
开发者ID:CNH-Hyper-Extractive,项目名称:parallel-sdk,代码行数:15,代码来源:InputSpaceTime.cs


示例20: LinkableComponentOpenMIV1Wrapper

        public LinkableComponentOpenMIV1Wrapper(ILinkableComponentVersion1 component1, 
            IDocumentAccessor accessor,
            List<Utilities.Standard1.Argument1> args1)
            : base(new Identity(component1.ComponentID,
                    component1.ModelID + " [OpenMIv1]", component1.ComponentDescription),
                new ExternalType(typeof(LinkableComponentOpenMIV1Wrapper)),
                new ExternalType(typeof(EngineProxy)))
        {
            Description += "\r\nConverted from OpenMI Standard 1";

            DocumentAccessor = accessor;

            var uriPersistence = InitialiseArguments(component1, args1);

            ConstuctComponent(component1, uriPersistence, args1);
        }
开发者ID:CNH-Hyper-Extractive,项目名称:parallel-sdk,代码行数:16,代码来源:LinkableComponentOpenMIV1Wrapper.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IDocumentLine类代码示例发布时间:2022-05-24
下一篇:
C# IDocument类代码示例发布时间: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