protected override void AddNodes() { InternalNodes.Add(new IgesNode(P1)); InternalNodes.Add(new IgesNode(P1P2Control1)); InternalNodes.Add(new IgesNode(P1P2Control2)); InternalNodes.Add(new IgesNode(P2)); InternalNodes.Add(new IgesNode(P2P3Control1)); InternalNodes.Add(new IgesNode(P2P3Control2)); InternalNodes.Add(new IgesNode(P3)); InternalNodes.Add(new IgesNode(P3P4Control1)); InternalNodes.Add(new IgesNode(P3P4Control2)); InternalNodes.Add(new IgesNode(P4)); InternalNodes.Add(new IgesNode(P4P1Control1)); InternalNodes.Add(new IgesNode(P4P1Control2)); InternalNodes.Add(new IgesNode(P5P1Control1)); InternalNodes.Add(new IgesNode(P6P2Control1)); InternalNodes.Add(new IgesNode(P7P3Control1)); InternalNodes.Add(new IgesNode(P8P4Control1)); InternalNodes.Add(new IgesNode(P5P1Control2)); InternalNodes.Add(new IgesNode(P6P2Control2)); InternalNodes.Add(new IgesNode(P7P3Control2)); InternalNodes.Add(new IgesNode(P8P4Control2)); InternalNodes.Add(new IgesNode(P5)); InternalNodes.Add(new IgesNode(P5P6Control1)); InternalNodes.Add(new IgesNode(P5P6Control2)); InternalNodes.Add(new IgesNode(P6)); InternalNodes.Add(new IgesNode(P6P7Control1)); InternalNodes.Add(new IgesNode(P6P7Control2)); InternalNodes.Add(new IgesNode(P7)); InternalNodes.Add(new IgesNode(P7P8Control1)); InternalNodes.Add(new IgesNode(P7P8Control2)); InternalNodes.Add(new IgesNode(P8)); InternalNodes.Add(new IgesNode(P8P5Control1)); InternalNodes.Add(new IgesNode(P8P5Control2)); }
protected override void AddNodes() { InternalNodes.Add(new IgesNode(File, P1)); InternalNodes.Add(new IgesNode(File, P2)); InternalNodes.Add(new IgesNode(File, P3)); InternalNodes.Add(new IgesNode(File, P4)); }
internal TableSourceList Add(TableSourceBase tableSource) { Argument.NotNull(tableSource, "tableSource"); var selectList = new TableSourceList(InternalNodes.Add(tableSource)); return(selectList); }
protected override void AddNodes() { InternalNodes.Add(new IgesNode(File, P1)); InternalNodes.Add(new IgesNode(File, P1P2Control1)); InternalNodes.Add(new IgesNode(File, P1P2Control2)); InternalNodes.Add(new IgesNode(File, P2)); InternalNodes.Add(new IgesNode(File, P2P3Control1)); InternalNodes.Add(new IgesNode(File, P2P3Control2)); InternalNodes.Add(new IgesNode(File, P3)); InternalNodes.Add(new IgesNode(File, P3P1Control1)); InternalNodes.Add(new IgesNode(File, P3P1Control2)); InternalNodes.Add(new IgesNode(File, P4P1Control1)); InternalNodes.Add(new IgesNode(File, P5P2Control1)); InternalNodes.Add(new IgesNode(File, P6P3Control1)); InternalNodes.Add(new IgesNode(File, P4P1Control2)); InternalNodes.Add(new IgesNode(File, P5P2Control2)); InternalNodes.Add(new IgesNode(File, P6P3Control2)); InternalNodes.Add(new IgesNode(File, P4)); InternalNodes.Add(new IgesNode(File, P4P5Control1)); InternalNodes.Add(new IgesNode(File, P4P5Control2)); InternalNodes.Add(new IgesNode(File, P5)); InternalNodes.Add(new IgesNode(File, P5P6Control1)); InternalNodes.Add(new IgesNode(File, P5P6Control2)); InternalNodes.Add(new IgesNode(File, P6)); InternalNodes.Add(new IgesNode(File, P6P4Control1)); InternalNodes.Add(new IgesNode(File, P6P4Control2)); }
internal OrderList Add(OrderBase order) { Argument.NotNull(order, "order"); var selectList = new OrderList(InternalNodes.Add(order)); return(selectList); }
protected override void AddNodes() { InternalNodes.Add(new IgesNode(Offset1)); InternalNodes.Add(new IgesNode(Offset2)); InternalNodes.Add(new IgesNode(P1)); InternalNodes.Add(new IgesNode(P2)); }
public virtual double TheveninVoltage(Node referenceNode, double t) { double v = 0; Dipole compo1 = null; Node node1 = null; foreach (var item in Components) { if (item.Nodes[0] == referenceNode || item.Nodes[1] == referenceNode) { compo1 = item; break; } } node1 = referenceNode; do { if (compo1 is Branch) { v += ((Branch)compo1).TheveninVoltage(node1, t); } else { v += compo1.voltage(node1, t); } node1 = compo1.OtherNode(node1); compo1 = node1.OtherComponent(compo1); } while (InternalNodes.Contains(node1)); return(v); }
internal SelectList Add(ProjectionBase projection) { Argument.NotNull(projection, "projection"); var selectList = new SelectList(InternalNodes.Add(projection)); return(selectList); }
protected override void AddNodes() { InternalNodes.Add(new IgesNode(P1)); InternalNodes.Add(new IgesNode(P2)); InternalNodes.Add(new IgesNode(P3)); InternalNodes.Add(new IgesNode(P4)); InternalNodes.Add(new IgesNode(P5)); }
public override void Remove(IBlock block) { int index = InternalNodes.IndexOf(block); if (index >= 0) { InternalNodes.RemoveAt(index); } }
/// <summary> Disables http on the nodes with the passed port numbers </summary> public VirtualCluster HttpDisabled(params int[] ports) { foreach (var node in InternalNodes.Where(n => ports.Contains(n.Uri.Port))) { var currentFeatures = node.Features.Count == 0 ? ElasticsearchNodeFeatures.Default : node.Features; node.Features = currentFeatures.Except(new[] { ElasticsearchNodeFeatures.HttpEnabled }).ToList().AsReadOnly(); } return(this); }
internal override void WriteParameters(List <object> parameters, IgesWriterBinder binder) { parameters.Add(this.TopologyNumber); parameters.Add(this.InternalNodes.Count); parameters.AddRange(InternalNodes.Select(binder.GetEntityId).Cast <object>()); parameters.Add(ElementTypeName); InternalNodes.Clear(); }
protected override void AddNodes() { InternalNodes.Add(new IgesNode(P1)); InternalNodes.Add(new IgesNode(P1P2Control)); InternalNodes.Add(new IgesNode(P2)); InternalNodes.Add(new IgesNode(P2P3Control)); InternalNodes.Add(new IgesNode(P3)); InternalNodes.Add(new IgesNode(P3P1Control)); }
/// <summary> Add a setting to the nodes with the passed port numbers </summary> public ElasticsearchVirtualCluster HasSetting(string key, string value, params int[] ports) { foreach (var node in InternalNodes.Where(n => ports.Contains(n.Uri.Port))) { node.Settings = new ReadOnlyDictionary <string, object>(new Dictionary <string, object> { { key, value } }); } return(this); }
internal TableSourceList ReplaceLast(TableSourceBase tableSource) { Argument.NotNull(tableSource, "tableSource"); if (InternalNodes.Count == 0) { throw new InvalidOperationException("Couldn't do ReplaceLast for empty list."); } var selectList = new TableSourceList(InternalNodes.SetItem(InternalNodes.Count - 1, tableSource)); return(selectList); }
public override void Add(IBlock block) { if (block is EnumValueBlock) { InternalNodes.Add(block); } else { throw new ArgumentException(); } }
protected override void AddNodes() { InternalNodes.Add(new IgesNode(File, P1)); InternalNodes.Add(new IgesNode(File, P1P2Control)); InternalNodes.Add(new IgesNode(File, P2)); InternalNodes.Add(new IgesNode(File, P2P3Control)); InternalNodes.Add(new IgesNode(File, P3)); InternalNodes.Add(new IgesNode(File, P3P4Control)); InternalNodes.Add(new IgesNode(File, P4)); InternalNodes.Add(new IgesNode(File, P4P1Control)); }
internal SelectList ReplaceLast(ProjectionBase projection) { Argument.NotNull(projection, "projection"); if (InternalNodes.Count == 0) { throw new InvalidOperationException("Couldn't do ReplaceLast for empty list."); } var selectList = new SelectList(InternalNodes.SetItem(InternalNodes.Count - 1, projection)); return(selectList); }
public override void Add(IBlock block) { if (InternalNodes.Count == 1) { InternalNodes[0] = block; } else { InternalNodes.Add(block); } }
internal OrderList ReplaceLast(OrderBase order) { Argument.NotNull(order, "order"); if (InternalNodes.Count == 0) { throw new InvalidOperationException("List is empty."); } var selectList = new OrderList(InternalNodes.SetItem(InternalNodes.Count - 1, order)); return(selectList); }
public bool ContainsResource(S resource) { Node n; if (!Owner.resourceMap.TryFindValue(resource, out n)) { return(false); } return(InternalNodes.Contains(n)); }
public override void Add(IBlock block) { if ((block is MethodBlock) || (block is FieldBlock) || (block is PropertyBlock) || (block is EventBlock)) { InternalNodes.Add(block); } else { throw new ArgumentException(); } }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { int index = 0; TopologyType = (IgesTopologyType)Integer(parameters, index++); var nodeCount = Integer(parameters, index++); for (var i = 0; i < nodeCount; i++) { binder.BindEntity(Integer(parameters, index++), e => InternalNodes.Add(e as IgesNode)); } ElementTypeName = String(parameters, index++); return(index); }
protected override void AddNodes() { InternalNodes.Add(new IgesNode(P1)); InternalNodes.Add(new IgesNode(P1P2Control)); InternalNodes.Add(new IgesNode(P2)); InternalNodes.Add(new IgesNode(P2P3Control)); InternalNodes.Add(new IgesNode(P3)); InternalNodes.Add(new IgesNode(P3P1Control)); InternalNodes.Add(new IgesNode(P4P1Control)); InternalNodes.Add(new IgesNode(P5P2Control)); InternalNodes.Add(new IgesNode(P6P3Control)); InternalNodes.Add(new IgesNode(P4)); InternalNodes.Add(new IgesNode(P4P5Control)); InternalNodes.Add(new IgesNode(P5)); InternalNodes.Add(new IgesNode(P5P6Contro)); InternalNodes.Add(new IgesNode(P6)); InternalNodes.Add(new IgesNode(P6P4Control)); }
protected override void AddNodes() { InternalNodes.Add(new IgesNode(File, P1)); InternalNodes.Add(new IgesNode(File, P1P2Control)); InternalNodes.Add(new IgesNode(File, P2)); InternalNodes.Add(new IgesNode(File, P2P3Control)); InternalNodes.Add(new IgesNode(File, P3)); InternalNodes.Add(new IgesNode(File, P3P4Control)); InternalNodes.Add(new IgesNode(File, P4)); InternalNodes.Add(new IgesNode(File, P4P1Control)); InternalNodes.Add(new IgesNode(File, P5P1Control)); InternalNodes.Add(new IgesNode(File, P6P2Control)); InternalNodes.Add(new IgesNode(File, P7P3Control)); InternalNodes.Add(new IgesNode(File, P8P4Control)); InternalNodes.Add(new IgesNode(File, P5)); InternalNodes.Add(new IgesNode(File, P5P6Control)); InternalNodes.Add(new IgesNode(File, P6)); InternalNodes.Add(new IgesNode(File, P6P7Control)); InternalNodes.Add(new IgesNode(File, P7)); InternalNodes.Add(new IgesNode(File, P7P8Control)); InternalNodes.Add(new IgesNode(File, P8)); InternalNodes.Add(new IgesNode(File, P8P5Control)); }
public virtual Complex32 NortonCurrent(Node referenceNode, Complex32?W = null) { Complex32 v = 0, z = 0; Dipole compo1 = null; Node node1 = null; //encuentro el componente unido al nodo de referencia foreach (var item in Components) { if (item.Nodes[0] == referenceNode || item.Nodes[1] == referenceNode) { compo1 = item; break; } } //a partir del nodo y el componente, escaneo la ramaenbusca de la Vthevenin y la Rthevenin node1 = referenceNode; do { if (compo1 is Branch) { v += ((Branch)compo1).TheveninVoltage(node1, W); } else if (compo1 is ACVoltageGenerator) { v += compo1.voltage(node1, W); } //los componentes pasivos no tienen tension en barrido en frecuencia z += compo1.Impedance(W); node1 = compo1.OtherNode(node1); compo1 = node1.OtherComponent(compo1); } while (InternalNodes.Contains(node1)); return(v / z); }
public virtual double NortonCurrent(Node referenceNode, double t) { if (CurrentImposser != null) { return(Current(referenceNode, t)); } double v = 0, z = 0; Dipole compo1 = null; Node node1 = null; foreach (var item in Components) { if (item.Nodes[0] == referenceNode || item.Nodes[1] == referenceNode) { compo1 = item; break; } } node1 = referenceNode; do { if (compo1 is Branch) { v += ((Branch)compo1).TheveninVoltage(node1, t); } else { v += compo1.voltage(node1, t); } z += compo1.Impedance().Real; node1 = compo1.OtherNode(node1); compo1 = node1.OtherComponent(compo1); } while (InternalNodes.Contains(node1)); return(v / z); }
protected override void AddNodes() { InternalNodes.Add(new IgesNode(Location)); }
protected override void AddNodes() { InternalNodes.AddRange(Nodes); }
/// <summary> /// Load rtf from rtf reader /// </summary> /// <param name="reader">RTF text reader</param> // ReSharper disable once MemberCanBePrivate.Global public void Load(Reader reader) { InternalNodes.Clear(); var groups = new Stack(); NodeGroup newGroup = null; while (reader.ReadToken() != null) { if (reader.TokenType == RtfTokenType.GroupStart) { // Begin group if (newGroup == null) { newGroup = this; } else { newGroup = new NodeGroup { OwnerDocument = this }; } if (newGroup != this) { var group = (NodeGroup)groups.Peek(); group.AppendChild(newGroup); } groups.Push(newGroup); } else if (reader.TokenType == RtfTokenType.GroupEnd) { // end group newGroup = (NodeGroup)groups.Pop(); newGroup.MergeText(); // ReSharper disable once CSharpWarnings::CS0183 if (newGroup.FirstNode is Node) { switch (newGroup.Keyword) { case Consts.Fonttbl: // Read font table ReadFontTable(newGroup); break; case Consts.Colortbl: // Read color table ReadColorTable(newGroup); break; case Consts.Info: // Read document information ReadDocumentInfo(newGroup); break; } } if (groups.Count > 0) { newGroup = (NodeGroup)groups.Peek(); } else { break; } //NewGroup.MergeText(); } else { // Read content var newNode = new Node(reader.CurrentToken) { OwnerDocument = this }; if (newGroup != null) { newGroup.AppendChild(newNode); } switch (newNode.Keyword) { case Consts.F: { var font = FontTable[newNode.Parameter]; _fontChartset = font != null ? font.Encoding : null; //myFontChartset = RTFFont.GetRTFEncoding( NewNode.Parameter ); } break; case Consts.Af: { var font = FontTable[newNode.Parameter]; _associatedFontChartset = font != null ? font.Encoding : null; } break; } } } while (groups.Count > 0) { newGroup = (NodeGroup)groups.Pop(); newGroup.MergeText(); } //this.UpdateInformation(); }