本文整理汇总了C#中IConnector.AttachEndPoint方法的典型用法代码示例。如果您正苦于以下问题:C# IConnector.AttachEndPoint方法的具体用法?C# IConnector.AttachEndPoint怎么用?C# IConnector.AttachEndPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IConnector
的用法示例。
在下文中一共展示了IConnector.AttachEndPoint方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProcessAttachEndPoint
public static void ProcessAttachEndPoint(IBlockWeb containerWeb, IConnector connector, XmlElement endpointElement, string blockId)
{
string endpointKey = null;
if (endpointElement.Name == "valueEndPoint")
{
if (!TemplateProcessor.ProcessTemplateFile(endpointElement, containerWeb, blockId, connector))
{
object value = ObjectReader.ReadObject(endpointElement);
endpointKey = connector.AttachEndPoint(value);
}
}
else if (endpointElement.Name == "serviceEndPoint")
{
if (!TemplateProcessor.ProcessTemplateFile(endpointElement, containerWeb, blockId, connector))
{
string endpointBlockId = endpointElement.GetAttribute("blockId");
string endpointService = endpointElement.GetAttribute("service");
if (!endpointElement.HasAttribute("blockId")) endpointBlockId = blockId;
endpointKey = connector.AttachEndPoint(endpointBlockId, endpointService);
}
}
else if (endpointElement.Name == "connectorEndPoint")
{
if (!TemplateProcessor.ProcessTemplateFile(endpointElement, containerWeb, blockId, connector))
{
string endpointBlockId = endpointElement.GetAttribute("blockId");
string endPointConnectorKey = endpointElement.GetAttribute("connectorKey");
if (!endpointElement.HasAttribute("blockId")) endpointBlockId = blockId;
endpointKey = connector.AttachConnectorEndPoint(endpointBlockId, endPointConnectorKey);
}
}
else
{
throw new InvalidOperationException();
}
//now process fixed args
XmlElement fixedArgsElement = endpointElement.SelectSingleNode("fixedArgs") as XmlElement;
if (fixedArgsElement != null && endpointKey != null)
{
List<Connector.EndPoint> fixedArgs = EndPointExtractor.ExtractArguments(fixedArgsElement, containerWeb);
foreach (Connector.EndPoint endPoint in fixedArgs)
{
connector.AddFixedArg(endpointKey, endPoint);
}
}
}
示例2: Attach
public void Attach(IConnector connector, IBlockWeb context)
{
string epKey = null;
if (value != null)
{
epKey = connector.AttachEndPoint(value);
}
else if (serviceName != null)
{
epKey = connector.AttachEndPoint(blockId, serviceName);
}
else
{
epKey = connector.AttachConnectorEndPoint(blockId, connectorKey);
}
foreach (EndPointDescriptor ep in FixedArgs)
{
connector.AddFixedArg(epKey, ep.GetEndPoint(context));
}
}
示例3: AttachToConnector
public void AttachToConnector(IConnector connector)
{
if (address != null)
{
if (addressIsConnector == false)
{
connector.AttachEndPoint(address.GetBlockId(), address.GetServiceName());
}
else
{
connector.AttachConnectorEndPoint(address.GetBlockId(), address.GetConnectorKey());
}
}
else if (epObject != null)
{
connector.AttachEndPoint(epObject.Value);
}
else
{
connector.AttachEndPoint(epIdentifier.Value);
}
}