本文整理汇总了C#中ILink类的典型用法代码示例。如果您正苦于以下问题:C# ILink类的具体用法?C# ILink怎么用?C# ILink使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ILink类属于命名空间,在下文中一共展示了ILink类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddLink
/// <summary>
/// Adds a link
/// </summary>
/// <param name="NewLink">The link</param>
public virtual void AddLink (ILink NewLink)
{
if (NewLink.SourceComponent==this)
{
for (int iNewDO = 0; iNewDO < NewLink.DataOperationsCount; iNewDO++)
{
IDataOperation newDataOperation = NewLink.GetDataOperation(iNewDO);
foreach (ILink link in _providingLinks)
{
for (int iExistingDO = 0; iExistingDO < link.DataOperationsCount; iExistingDO++)
{
IDataOperation existingDataOperation = link.GetDataOperation(iExistingDO);
if (newDataOperation == existingDataOperation)
{
Event warning = new Event(EventType.Warning);
warning.Description = "DataOperation " + newDataOperation.ID + " has already been used. " +
"It's argument values will overrule the values set previously for this operation.";
warning.Sender = this;
SendEvent(warning);
}
}
}
}
_providingLinks.Add(NewLink);
}
if (NewLink.TargetComponent==this)
{
_acceptingLinks.Add(NewLink);
}
}
示例2: AddInput
public void AddInput(ILink link, IFuzzyNumber weight)
{
_inputs.Add(link);
_weights.Add(new Link(weight));
_weightsDeltas.Add(new Link());
_weightsLambdas.Add(_defaultWeightLambda);
}
示例3: RelationshipObject
/// <summary>
/// Builds a new RelationshipObject with links and linkage
/// </summary>
public RelationshipObject(IResourceLinkage linkage, ILink selfLink, ILink relatedResourceLink, IMetadata metadata = null)
{
Linkage = linkage;
SelfLink = selfLink;
RelatedResourceLink = relatedResourceLink;
Metadata = metadata;
}
示例4: Token
private Token(Token oldToken, ILink link)
: this(oldToken.Document, oldToken.FullName, oldToken.Value, oldToken.Type, oldToken.LineNumber, oldToken.IsDeclaration, oldToken.IsSearchable)
{
Link = link;
LeadingTrivia = oldToken.LeadingTrivia;
TrailingTrivia = oldToken.TrailingTrivia;
}
示例5: LinkViewModel
public LinkViewModel(ILink link)
{
if (link == null)
throw new ArgumentNullException("link");
this.link = link;
}
示例6: setLink
public void setLink(ILink link)
{
if (_link == link) return;
_link = link;
dependEntity = calculateDependEntity();
}
示例7: Contains
/// <summary>
/// Checks whether the specified link is a participant in the path.
/// </summary>
public bool Contains(ILink link)
{
foreach (ILink l in _links)
if (l.Equals(link))
return true;
return false;
}
示例8: SandboxControlLink
public SandboxControlLink(ILink link, INode from, INode to, SandboxControl control, IKeyTableFactory tableFactory, IPrimFactory primFactory, IPermissions permissions)
: base(link, from, to, control, permissions)
{
_control = control;
_bufferedChanges = tableFactory.MakeKeyTable<double>();
_dialog = new Dialog(control.HostPrim, primFactory, LINK_BUTTONS);
_dialog.ResponseReceived += DialogPressed;
}
示例9: ApplyChanges
protected override HttpRequestMessage ApplyChanges(ILink link, HttpRequestMessage request)
{
request.Headers.Accept.Clear();
foreach (var headerValue in _AcceptHeader)
{
request.Headers.Accept.Add(headerValue);
}
return request;
}
示例10: RemoveLink
public void RemoveLink(ILink link)
{
if (link == null)
throw new ArgumentNullException("link");
if (!links.Contains(link))
return;
links.Remove(link);
}
示例11: AddLink
public void AddLink(ILink link)
{
if (link == null)
throw new ArgumentNullException("link");
if (links.Contains(link))
return;
links.Add(link);
}
示例12: ResourceObject
/// <summary>
/// Creates a ResourceObject
/// </summary>
public ResourceObject(string type, string id, IDictionary<string, JToken> attributes = null,
IDictionary<string, IRelationshipObject> relationships = null, ILink selfLink = null, IMetadata metadata = null)
{
Type = type;
Id = id;
Attributes = attributes ?? new Dictionary<string, JToken>();
Relationships = relationships ?? new Dictionary<string, IRelationshipObject>();
SelfLink = selfLink;
Metadata = metadata;
}
示例13: TorshifySongPlayerTest
public TorshifySongPlayerTest()
{
_session = Substitute.For<ISession>();
_link = Substitute.For<ILink<ITrackAndOffset>>();
var linkFactory = Substitute.For<ILinkFactory>();
linkFactory.GetLink(Arg.Any<string>()).Returns(_link);
_songPlayer = new TorshifySongPlayer(_session, linkFactory);
}
示例14: ReceiverStmContext
public ReceiverStmContext(ILink link, IChecksum cheksum, ISequenceGenerator sequenceGenerator,
int maxMessageDataSize)
{
_message = new Message(maxMessageDataSize);
_reply = new Message(0);
_link = link;
_sequence = sequenceGenerator;
_checksum = cheksum;
SetState(new MissingSync());
}
示例15: AddLink
public void AddLink(ILink link)
{
var myLink = link as Link;
if (myLink != null)
{
if (myLink.Source != null)
myLink.Source.ChildrenCount++;
this.mindmapLinks.Add(myLink);
}
}