本文整理汇总了C#中Guid.TagString方法的典型用法代码示例。如果您正苦于以下问题:C# Guid.TagString方法的具体用法?C# Guid.TagString怎么用?C# Guid.TagString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Guid
的用法示例。
在下文中一共展示了Guid.TagString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProxyConnect
/// <summary>
/// Connects this link object with the WCF service. If it has been already connected, an exceptio will be thrown.
/// </summary>
/// <param name="endpoint">The endpoint to use to locate the WCF service.</param>
/// <param name="package">The connection package to use by the service to modulate how it will connect with the real
/// underlying database, if needed, or null if it is not needed.</param>
public virtual void ProxyConnect( string endpoint, DeepObject package )
{
DEBUG.IndentLine( "\n-- KLinkWCF.ProxyConnect( EndPoint={0}, Package={1}", endpoint ?? "<null>", package == null ? "<null>" : package.ToString() );
if( _Proxy != null ) throw new InvalidOperationException( "This link is already connected." );
_EndPoint = endpoint.Validated( "EndPoint" );
_Package = package;
var channelFactory = new ChannelFactory<IKProxyWCF>( _EndPoint );
_Proxy = channelFactory.CreateChannel();
_ProxyId = _Proxy.ProxyConnect( _Package );
DEBUG.WriteLine( "\n-- Connected with UID = {0}", _ProxyId.TagString() );
DEBUG.Unindent();
}
示例2: ExecutorDispose
/// <summary>
/// Disposes the executor identified by the given Guid.
/// </summary>
/// <param name="uid">The Guid of the executor.</param>
public void ExecutorDispose( Guid uid )
{
DEBUG.IndentLine( "\n-- [{0}] KServerWCF.ExecutorDispose( {1} )", _ProxyId.TagString(), uid.TagString() );
try {
if( _Link == null ) throw new InvalidOperationException( "WCF Server is not yet connected." );
object obj = null; if( _Elements.TryGetValue( uid, out obj ) ) {
_Elements.Remove( uid );
IKExecutor executor = obj as IKExecutor;
if( executor != null ) {
IKCommandExecutable cmd = (IKCommandExecutable)executor.Command;
executor.Dispose();
cmd.Dispose();
return;
}
}
throw new InvalidOperationException( "Executor not found: " + uid.TagString() );
}
catch( Exception e ) { DEBUG.PrintException( e ); throw; }
finally { DEBUG.Unindent(); }
}
示例3: ExecutorExecute
/// <summary>
/// Executes the executor identified by its Guid, and returns the number of records affected.
/// </summary>
/// <param name="uid">The Guid of the executor.</param>
/// <returns>The number of records affected.</returns>
public int ExecutorExecute( Guid uid )
{
DEBUG.IndentLine( "\n-- [{0}] KServerWCF.ExecutorExecute( {1} )", _ProxyId.TagString(), uid.TagString() );
try {
if( _Link == null ) throw new InvalidOperationException( "WCF Server is not yet connected." );
object obj = null; if( _Elements.TryGetValue( uid, out obj ) ) {
IKExecutor executor = obj as IKExecutor;
if( executor != null ) {
int r = executor.Execute();
return r;
}
}
throw new InvalidOperationException( "Executor not found: " + uid.TagString() );
}
catch( Exception e ) { DEBUG.PrintException( e ); throw; }
finally { DEBUG.Unindent(); }
}
示例4: EnumeratorCurrent
/// <summary>
/// Gets the current element of the enumerator identified by the given Guid, in the form of an instance of the
/// <see cref="KRecord"/> class.
/// </summary>
/// <param name="uid">The Guid of the enumerator.</param>
/// <returns>The current <see cref="KRecord"/> instance.</returns>
public KRecord EnumeratorCurrent( Guid uid )
{
DEBUG.IndentLine( "\n-- [{0}] KServerWCF.EnumeratorCurrent( {1} )", _ProxyId.TagString(), uid.TagString() );
try {
if( _Link == null ) throw new InvalidOperationException( "WCF Server is not yet connected." );
object obj = null; if( _Elements.TryGetValue( uid, out obj ) ) {
IKEnumerator reader = obj as IKEnumerator;
if( reader != null ) return reader.CurrentRecord;
}
throw new InvalidOperationException( "Reader not found: " + uid.TagString() );
}
catch( Exception e ) { DEBUG.PrintException( e ); throw; }
finally { DEBUG.Unindent(); }
}