本文整理汇总了C#中Udbus类的典型用法代码示例。如果您正苦于以下问题:C# Udbus类的具体用法?C# Udbus怎么用?C# Udbus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Udbus类属于命名空间,在下文中一共展示了Udbus类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IncorrectTypeException
public IncorrectTypeException(Udbus.Types.dbus_type expectedType, object providedValue, Udbus.Types.dbus_type[] providedTypes, string message)
: base(message)
{
this.expectedType = expectedType;
this.providedValue = providedValue;
this.providedTypes = providedTypes;
}
示例2: ReadVariantBoolean
public int ReadVariantBoolean(Udbus.Containers.dbus_union variant)
{
bool val;
int result = this.ReadBoolean(out val);
variant.DbusBoolean = val;
return result;
}
示例3: ReadVariantObjectPath
public int ReadVariantObjectPath(Udbus.Containers.dbus_union variant)
{
Udbus.Types.UdbusObjectPath val;
int result = this.ReadObjectPath(out val);
variant.DbusObjectPath = val;
return result;
}
示例4: UdbusMessageSignalArgumentException
//UdbusMessageSignalArgumentException.Create(1, "percent_free", typeof(Int32), this.result, "storage_space_low", messageData.Data, this.signalKey)
public UdbusMessageSignalArgumentException(uint index, string argument, Type argumentType, int result,
string signal, Udbus.Core.DbusSignalParams signalParams,
Udbus.Serialization.NMessageStruct.UdbusMessageHandle msgStruct)
: base(signal, signalParams, msgStruct)
{
this.index = index;
this.argument = argument;
this.argumentType = argumentType;
this.result = result;
}
示例5: v4vConnection
public v4vConnection(Udbus.Serialization.UdbusDelegates.D_io_debug io_debug)
{
this.io_debug = io_debug;
// Form the v4v connection.
v4vConnectionHandle handle = v4vConnectionFunctions.connect_v4v_socket(this.io_debug);
if (handle == null || handle.IsInvalid)
{
throw Udbus.Serialization.Exceptions.TransportFailureException.Create(this, "Error calling connect_v4v_socket");
}
this._handle = handle;
}
示例6: GetV4vConnection
public static void GetV4vConnection(out Udbus.v4v.v4vConnection connection, out Udbus.Core.ServiceConnectionParams serviceConnectionParams,
Udbus.Serialization.UdbusDelegates.D_io_debug io_debug, System.Threading.ManualResetEvent stop,
Udbus.Core.Logging.ILog log)
{
connection = null;
serviceConnectionParams = null;
while (serviceConnectionParams == null)
{
using (Udbus.v4v.v4vConnection connectionTemp = KeepTryingToConnectToV4V(io_debug, stop, log))
{
if (connectionTemp != null) // If got v4v connection
{
Udbus.v4v.v4vConnection connectionTemp2 = connectionTemp.Release();
try
{
Udbus.Core.ServiceConnectionParams serviceConnectionParamsTemp = TryServiceConnectionParams(connectionTemp2, log);
if (serviceConnectionParamsTemp == null) // If failed to create service connection
{
connectionTemp.Swap(connectionTemp2);
} // Ends if failed to create service connection
else // Else created service connection
{
serviceConnectionParams = serviceConnectionParamsTemp;
connection = connectionTemp2;
} // Ends else created service connection
}
catch (Exception /*ex*/)
{
connectionTemp.Swap(connectionTemp2);
throw;
}
} // Ends if got v4v connection
} // Ends using v4vConnection
if (serviceConnectionParams == null) // If failed to create connection
{
// Wait a while.
System.Threading.Thread.Sleep(ConnectionWaitMilliseconds);
} // Ends if failed to create connection
} // Ends while trying to setup service connection
}
示例7: CreateDbusDiag
internal static com.citrix.xenclient.xenmgr.diag.diagService CreateDbusDiag(out Udbus.Core.ServiceConnectionParams serviceConnectionParams,
Udbus.Core.Logging.ILog log, Udbus.Serialization.UdbusDelegates.D_io_debug io_debug)
{
// Create a V4V connection.
Udbus.v4v.v4vConnection connection;
System.Threading.ManualResetEvent stop = new System.Threading.ManualResetEvent(false);
DbusHosts.GetV4vConnection(out connection, out serviceConnectionParams,
io_debug, stop,
log
);
// Use dbus interface to xenmgr.diag.
Udbus.Serialization.DbusConnectionParameters dbusConnectionParameters = com.citrix.xenclient.xenmgr.diag.diagService.DefaultConnectionParameters;
dbusConnectionParameters.Destination = "com.citrix.xenclient.xenmgr";
com.citrix.xenclient.xenmgr.diag.diagService diag = com.citrix.xenclient.xenmgr.diag.diagService.Create(serviceConnectionParams, dbusConnectionParameters);
return diag;
}
示例8: XenClientGuestWCFService
private XenClientGuestWCFService(Udbus.Core.Logging.ILog log)
{
this.log = log;
// Initialize the uuid field from XenStore.
XenStoreLib.XenStoreWrapper xenStoreWrapper = new XenStoreLib.XenStoreWrapper();
string vm = xenStoreWrapper.ReadString("vm");
string uuidPath = string.Format("{0}/uuid", vm);
this.uuid_ = xenStoreWrapper.ReadString(uuidPath);
// Work out the install directory.
this.installDir = System.IO.Path.Combine(System.Environment.GetEnvironmentVariable("PROGRAMFILES") ?? "C:\\Program Files", "Citrix");
this.installDir = System.IO.Path.Combine(installDir, "XenGuestPlugin");
Microsoft.Win32.RegistryKey installKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(InstallRegkeyName);
if (installKey != null)
{
string installVal = (string)installKey.GetValue(XcInstallDirName);
if (!string.IsNullOrEmpty(installVal))
{
this.installDir = installVal;
}
}
}
示例9: VisitorThreadInfo
public VisitorThreadInfo(Udbus.Core.ServiceConnectionParams serviceConnectionParams,
System.Threading.EventWaitHandle stop)
: this(serviceConnectionParams.SignalConnector, serviceConnectionParams.SignalVisitor, serviceConnectionParams.ReceiverPool, stop, DefaultTextWriter)
{
}
示例10: CreateMessage
protected static new string CreateMessage(string method, Udbus.Serialization.DbusConnectionParameters connectionParams,
Udbus.Serialization.NMessageStruct.UdbusMessageHandle msgStruct)
{
string message = string.Format("dbus error: {0}. {1}. {2} - '{3}'", msgStruct.error_name, msgStruct.ToString(), connectionParams.ToString(), method);
return message;
}
示例11: UdbusMessageMethodErrorException
public UdbusMessageMethodErrorException(string method, Udbus.Serialization.DbusConnectionParameters connectionParams,
Udbus.Serialization.NMessageStruct.UdbusMessageHandle msgStruct, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(method, connectionParams, msgStruct, info, context)
{
}
示例12: UdbusMessageMethodArgumentOutException
public UdbusMessageMethodArgumentOutException(uint index, string argument, Type argumentType, int result,
string method,
Udbus.Serialization.DbusConnectionParameters connectionParams,
Udbus.Serialization.NMessageStruct.UdbusMessageHandle msgStruct,
System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(FieldDirection.Out, index, argument, argumentType, result, method, connectionParams, msgStruct, info, context)
{
}
示例13: Create
public static UdbusMessageMethodArgumentOutException Create(uint index, string argument, Type argumentType, int result,
string method,
Udbus.Serialization.DbusConnectionParameters connectionParams,
Udbus.Serialization.NMessageStruct.UdbusMessageHandle msgStruct,
string message)
{
return new UdbusMessageMethodArgumentOutException(index, argument, argumentType, result, method, connectionParams, msgStruct,
ExceptionFormatter.FormatExceptionMessage(message, CreateMessage(index, argument, argumentType, result, method, connectionParams, msgStruct)));
}
示例14: UdbusMessageMethodArgumentException
public UdbusMessageMethodArgumentException(FieldDirection direction, uint index, string argument, Type argumentType, int result,
string method, Udbus.Serialization.DbusConnectionParameters connectionParams,
Udbus.Serialization.NMessageStruct.UdbusMessageHandle msgStruct,
string message, Exception inner)
: base(method, connectionParams, msgStruct, message, inner)
{
this.direction = direction;
this.index = index;
this.argument = argument;
this.argumentType = argumentType;
this.result = result;
}
示例15: UdbusMessageMethodException
public UdbusMessageMethodException(string method, Udbus.Serialization.DbusConnectionParameters connectionParams,
Udbus.Serialization.NMessageStruct.UdbusMessageHandle msgStruct,
string message)
: base(connectionParams, msgStruct, message)
{
this.method = method;
}