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

C# NodeType类代码示例

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

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



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

示例1: NetworkNode

 /// <summary>
 /// Constructs with the provided node ID, type and activation function ID.
 /// </summary>
 public NetworkNode(uint id, NodeType nodeType, int activationFnId)
 {
     _id = id;
     _nodeType = nodeType;
     _activationFnId = activationFnId;
     _auxState = null;
 }
开发者ID:MrChocolateMoose,项目名称:DeepHyperNEAT,代码行数:10,代码来源:NetworkNode.cs


示例2: should_get_node

 public void should_get_node(NodeType type)
 {
     var parent = new Node { NodeType = type };
     var child = new Node("hai");
     parent.Add(child, x => { });
     parent.GetNode("hai").ShouldEqual(child);
 }
开发者ID:carl-berg,项目名称:Bender,代码行数:7,代码来源:NodeBaseTests.cs


示例3: Update

	public void Update(NodeType nextType)
	{
		if (nextType == nodeType)
		{
			return;
		}

		switch(nextType)
		{
			case NodeType.Sequence:
				mInternalNode = new BirdNest.Nodes.Sequence();
				break;
			case NodeType.Selector:
				mInternalNode = new BirdNest.Nodes.Selector();
				break;
			case NodeType.Parallel:
				mInternalNode = new BirdNest.Nodes.Parallel();
				break;
			case NodeType.UsePlan:
				mInternalNode = new BirdNest.Nodes.UsePlanNode(this);
				break;
			default:
				mInternalNode = null;
				return;
		}
		nodeType = nextType;
	}
开发者ID:tgsstdio,项目名称:BirdNest.Nodes,代码行数:27,代码来源:PlanNode.cs


示例4: QuadNode

        public QuadNode(NodeType nodeType, int nodeSize, int nodeDepth, QuadNode parent, QuadTree parentTree, int positionIndex)
        {
            NodeType = nodeType;
            _nodeSize = nodeSize;
            _nodeDepth = nodeDepth;
            _positionIndex = positionIndex;

            _parent = parent;
            _parentTree = parentTree;

            //Add the 9 vertices
            AddVertices();

            Bounds = new BoundingBox(_parentTree.Vertices[VertexTopLeft.Index].Position,
                        _parentTree.Vertices[VertexBottomRight.Index].Position);

            if (nodeSize >= 4)
                AddChildren();

            //Make call to UpdateNeighbors from the parent node.
            //This will update all neighbors recursively for the
            //children as well.  This ensures all nodes are created
            //prior to updating neighbors.
            if (_nodeDepth == 1)
            {
                AddNeighbors();

                VertexTopLeft.Activated = true;
                VertexTopRight.Activated = true;
                VertexCenter.Activated = true;
                VertexBottomLeft.Activated = true;
                VertexBottomRight.Activated = true;

            }
        }
开发者ID:MenosGrandes,项目名称:mrowisko-pbl,代码行数:35,代码来源:QuadNode.cs


示例5: Node

 /// <summary>
 /// Constructs a new node.
 /// </summary>
 internal Node(String name, NodeType type = NodeType.Element, NodeFlags flags = NodeFlags.None)
 {
     _name = name ?? String.Empty;
     _type = type;
     _children = new NodeList();
     _flags = flags;
 }
开发者ID:jogibear9988,项目名称:AngleSharp,代码行数:10,代码来源:Node.cs


示例6: NodeGreetingMessageVerifier

        public NodeGreetingMessageVerifier(NodeType localNodeType, NodeType expectedRemoteNodeType, params NodeType[] allowOtherRemoteNoteTypes)
        {
            _expectedRemoteNodeTypes = new HashSet<NodeType> { expectedRemoteNodeType };
            if (allowOtherRemoteNoteTypes != null) _expectedRemoteNodeTypes.UnionWith(allowOtherRemoteNoteTypes);

            _greetingMessage = new NodeGreetingMessage(localNodeType);
        }
开发者ID:tleviathan,项目名称:redfoxmq,代码行数:7,代码来源:NodeGreetingMessageVerifier.cs


示例7: XmlNodeInformation

 public XmlNodeInformation(string contentValue, int depth, CommonNamespaces commonNamespaces)
 {
     m_contentValue = contentValue;
     iDepth = depth;
     nodeType = NodeType.content;
     m_commonNamespaces = commonNamespaces;
 }
开发者ID:killbug2004,项目名称:WSProf,代码行数:7,代码来源:XmlNodeInformation.cs


示例8: Find

		public override INode Find(INodeResolver resolver, string uri, NodeType nodeType, FileSystemOptions options)
		{
			var address = LayeredNodeAddress.Parse(uri);

			if (address.Port >= 0 || address.UserName != "" || address.Password != "" || address.ServerName != "")
			{
				throw new MalformedUriException(uri, "Network & Authentication information not permitted");
			}

			if (nodeType.Is(typeof(IFile)))
			{
				var uri2 = address.InnerUri;

				if (StringUriUtils.ContainsQuery(uri2))
				{
					uri2 += "&shadow=true";
				}
				else
				{
					uri2 += "?shadow=true";
				}

				return resolver.Resolve(uri2, nodeType);
			}

			return resolver.Resolve(address.InnerUri);
		}
开发者ID:Euphrates-Media,项目名称:Platform.VirtualFileSystem,代码行数:27,代码来源:ShadowNodeProvider.cs


示例9: CreateNode

		protected override INode CreateNode(INodeAddress address, NodeType nodeType)
		{
			if (!address.IsRoot)
			{
				var parent = (IDirectory)this.Resolve(address.Parent, NodeType.Directory);

				if (parent is ImaginaryDirectory)
				{
					var retval = ((ImaginaryDirectory)parent).GetImaginaryChild(address.Name, nodeType);

					if (retval != null)
					{
						return retval;
					}
				}
			}

			if (nodeType == NodeType.Directory)
			{								
				return new ImaginaryDirectory(this, address);
			}
			else if (nodeType == NodeType.File)
			{
				return new ImaginaryFile(this, address);
			}

			throw new NotSupportedException(String.Format("{0}:{1}", address, nodeType));
		}
开发者ID:Euphrates-Media,项目名称:Platform.VirtualFileSystem,代码行数:28,代码来源:ImaginaryFileSystem.cs


示例10: GetNameToValueCollectionFromElementForType

        /// <summary>
        /// Gets the type of the name to value collection from element for.
        /// </summary>
        /// <param name="mainDocumentPart">The main document part.</param>
        /// <param name="elementName">Name of the element.</param>
        /// <param name="forNodeType">Type of for node.</param>
        /// <returns></returns>
        public Dictionary<string, string> GetNameToValueCollectionFromElementForType(MainDocumentPart mainDocumentPart, string elementName, NodeType forNodeType)
        {
            Dictionary<string, string> nameToValueCollection = new Dictionary<string, string>();
            CustomXmlPart customXmlPart = this.customXmlPartCore.GetCustomXmlPart(mainDocumentPart);

            if (customXmlPart != null)
            {
                XElement element = this.customXmlPartCore.GetFirstElementFromCustomXmlPart(customXmlPart, elementName);

                if (element != null)
                {
                    if (forNodeType == NodeType.Element)
                    {
                        foreach (XElement elem in element.Elements())
                        {
                            nameToValueCollection.Add(elem.Name.LocalName, elem.Nodes().Where(node => node.NodeType == XmlNodeType.Element).FirstOrDefault().ToString());
                        }
                    }
                    else if (forNodeType == NodeType.Attribute)
                    {
                        foreach (XAttribute attr in element.Attributes())
                        {
                            nameToValueCollection.Add(attr.Name.LocalName, attr.Value);
                        }
                    }
                }
            }

            return nameToValueCollection;
        }
开发者ID:chutinhha,项目名称:tvmcorptvs,代码行数:37,代码来源:CustomXmlPartHelper.cs


示例11: AddGeoTreeNode

 public void AddGeoTreeNode(NodeType mapNodeType, List<GeoNodePara> clutterNodeParas)
 {
     if (clutterNodeParas.Count != 0)
     {
         List<GeoTreeNode> treeNode = new List<GeoTreeNode>();
         foreach (GeoNodePara para in clutterNodeParas)
         {
             GeoTreeNode item = this.GetGeoFolderNodeByName(this.m_DynamicNodeCollection, mapNodeType, para.FolderName);
             if (item == null)
             {
                 item = new GeoTreeNode(para.FolderName, LayerIDCreator.GetExclusiveID(), mapNodeType, CheckedState.Checked);
                 this.m_DynamicNodeCollection.Add(item);
                 treeNode.Add(item);
             }
             GeoTreeNode node2 = new GeoTreeNode(para.LayerName, para.LayerId, mapNodeType, CheckedState.Checked);
             foreach (KeyValuePair<int, string> pair in para.ClutterIdNameDict)
             {
                 int tag = (para.LayerId << 0x10) + ((short) pair.Key);
                 GeoTreeNode node3 = new GeoTreeNode(pair.Value, tag, mapNodeType, CheckedState.Checked);
                 node2.ChildrenNodes.Add(node3);
             }
             item.ChildrenNodes.Add(node2);
         }
         if (this.OnAddModelNodeEvent != null)
         {
             this.OnAddModelNodeEvent(treeNode);
         }
     }
 }
开发者ID:xiaoyj,项目名称:Space,代码行数:29,代码来源:GeoTreeModel.cs


示例12: NodeValue

 //Constructor
 public NodeValue(string name, Object value, NodeType type)
     : base(name, Node.EmptyNodes)
 {
     _type = type;
     _value = value;
     _desc = "Value";
 }
开发者ID:larsenjo,项目名称:odata.net,代码行数:8,代码来源:NodeValue.cs


示例13: BaseNode

        public BaseNode(string nodename)
        {
            NodeType = NodeType.Base;
            this.Text = nodename;
            this.ImageIndex = DataConvert.GetInt32(IconType.VsTemplates);
            this.SelectedImageIndex = DataConvert.GetInt32(IconType.VsTemplates);
		}
开发者ID:jojozhuang,项目名称:Projects,代码行数:7,代码来源:Nodes.cs


示例14: addClassInfoGraphNode

 IClassInfoGraphNode addClassInfoGraphNode(ObjectSpace objectSpace, IMemberInfo memberInfo, NodeType nodeType) {
     var classInfoGraphNode =(IClassInfoGraphNode)objectSpace.CreateObject(TypesInfo.Instance.ClassInfoGraphNodeType);
     classInfoGraphNode.Name = memberInfo.Name;
     classInfoGraphNode.TypeName = getSerializedType(memberInfo).Name;
     classInfoGraphNode.NodeType=nodeType;            
     return classInfoGraphNode;
 }
开发者ID:corzar,项目名称:eXpand,代码行数:7,代码来源:ClassInfoGraphNodeBuilder.cs


示例15: DoGetChildren

		public override IEnumerable<INode> DoGetChildren(NodeType nodeType, Predicate<INode> acceptNode)
		{
			foreach (string key in Environment.GetEnvironmentVariables().Keys)
			{
				yield return GetImaginaryChild(key, NodeType.File);
			}
		}
开发者ID:Euphrates-Media,项目名称:Platform.VirtualFileSystem,代码行数:7,代码来源:EnvironmentVariablesDirectory.cs


示例16: Node

 public Node(string reference, GTASprite sprite, NodeType type)
 {
     Ref = reference;
     Direction = TreeDirection.Auto;
     Type = type;
     Sprite = sprite;
 }
开发者ID:logicspawn,项目名称:GTARPG,代码行数:7,代码来源:NTree.cs


示例17: GetChildByType

 public Node GetChildByType(NodeType type)
 {
     if (Children != null)
         return Children.FirstOrDefault(c => c.Type == type);
     else
         return null;
 }
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:7,代码来源:Node.cs


示例18: BinaryFormula

 protected internal BinaryFormula(NodeType nodeType, Formula left, IMethodDeclaration method, Formula right)
     : base(nodeType, left.Type)
 {
     Left = left;
     Method = method;
     Right = right;
 }
开发者ID:urasandesu,项目名称:NTroll,代码行数:7,代码来源:BinaryFormula.cs


示例19: Node

 public Node(NodeType nt,int sym,int freq,int order)
 {
     this.nt = nt;
     this.sym = sym;
     this.freq = freq;
     this.order = order;
 }
开发者ID:astarasikov,项目名称:HuffmanArchiver,代码行数:7,代码来源:HuffTree.cs


示例20: Resolve

		public override INode Resolve(string uri, NodeType nodeType, AddressScope scope, FileSystemOptions options)
		{
			bool success;
			IFileSystem fileSystem;

			var address = LayeredNodeAddress.Parse(uri);
						
			lock (this.fileSystemCache)
			{
				success = this.fileSystemCache.TryGetValue(address.RootUri, out fileSystem);
			}

			if (!success)
			{
				var networkUri = String.Format("netvfs://{0}[" + uri + "]/", this.ipAddress);

				fileSystem = FileSystemManager.GetManager().ResolveDirectory(networkUri).FileSystem;

				lock (this.fileSystemCache)
				{
					this.fileSystemCache.Add(address.RootUri, fileSystem);
				}
			}

			return fileSystem.Resolve(address.PathAndQuery);
		}
开发者ID:Euphrates-Media,项目名称:Platform.VirtualFileSystem,代码行数:26,代码来源:NetworkFileSystemManager.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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