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


C# IDocumentAccessor类代码示例

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


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


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