• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Udbus类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Udbus的典型用法代码示例。如果您正苦于以下问题:C# Udbus类的具体用法?C# Udbus怎么用?C# Udbus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Udbus类属于命名空间,在下文中一共展示了Udbus类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
 }
开发者ID:rneilturner,项目名称:win-tools,代码行数:7,代码来源:Udbus.Containers.Exceptions.cs


示例2: ReadVariantBoolean

 public int ReadVariantBoolean(Udbus.Containers.dbus_union variant)
 {
     bool val;
     int result = this.ReadBoolean(out val);
     variant.DbusBoolean = val;
     return result;
 }
开发者ID:jean-edouard,项目名称:win-tools,代码行数:7,代码来源:Udbus.Container.MagicSauce.cs


示例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;
 }
开发者ID:jean-edouard,项目名称:win-tools,代码行数:7,代码来源:Udbus.Container.MagicSauce.cs


示例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;
 }
开发者ID:rneilturner,项目名称:win-tools,代码行数:11,代码来源:UdbusSignalExceptions.cs


示例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;
        }
开发者ID:rneilturner,项目名称:win-tools,代码行数:14,代码来源:v4vConnection.cs


示例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
        }
开发者ID:rneilturner,项目名称:win-tools,代码行数:47,代码来源:DbusHosts.cs


示例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;
        }
开发者ID:jean-edouard,项目名称:win-tools,代码行数:18,代码来源:XcDiagRunner.cs


示例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;
                }
            }
        }
开发者ID:jean-edouard,项目名称:win-tools,代码行数:24,代码来源:XenClientGuestWCFService.cs


示例9: VisitorThreadInfo

 public VisitorThreadInfo(Udbus.Core.ServiceConnectionParams serviceConnectionParams,
     System.Threading.EventWaitHandle stop)
     : this(serviceConnectionParams.SignalConnector, serviceConnectionParams.SignalVisitor, serviceConnectionParams.ReceiverPool, stop, DefaultTextWriter)
 {
 }
开发者ID:rneilturner,项目名称:win-tools,代码行数:5,代码来源:DbusUtils.cs


示例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;
 }
开发者ID:jean-edouard,项目名称:win-tools,代码行数:6,代码来源:UdbusExceptions.cs


示例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)
 {
 }
开发者ID:jean-edouard,项目名称:win-tools,代码行数:5,代码来源:UdbusExceptions.cs


示例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)
 {
 }
开发者ID:jean-edouard,项目名称:win-tools,代码行数:8,代码来源:UdbusExceptions.cs


示例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)));
 }
开发者ID:jean-edouard,项目名称:win-tools,代码行数:9,代码来源:UdbusExceptions.cs


示例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;
 }
开发者ID:jean-edouard,项目名称:win-tools,代码行数:12,代码来源:UdbusExceptions.cs


示例15: UdbusMessageMethodException

 public UdbusMessageMethodException(string method, Udbus.Serialization.DbusConnectionParameters connectionParams,
     Udbus.Serialization.NMessageStruct.UdbusMessageHandle msgStruct,
     string message)
     : base(connectionParams, msgStruct, message)
 {
     this.method = method;
 }
开发者ID:jean-edouard,项目名称:win-tools,代码行数:7,代码来源:UdbusExceptions.cs


示例16: UdbusMessageMethodArgumentInException

 public UdbusMessageMethodArgumentInException(uint index, string argument, Type argumentType, int result,
     string method,
     Udbus.Serialization.DbusConnectionParameters connectionParams, string message, Exception inner)
     : base(FieldDirection.In, index, argument, argumentType, result, method, connectionParams, DefaultMsgStruct, message, inner)
 {
 }
开发者ID:jean-edouard,项目名称:win-tools,代码行数:6,代码来源:UdbusExceptions.cs


示例17: DebugVisitor

 internal static Udbus.Core.IUdbusMessageVisitor DebugVisitor(Udbus.Core.IUdbusMessageVisitor visitor)
 {
     Udbus.Core.UdbusMessageVisitorDumpLog visitorDump = new Udbus.Core.UdbusMessageVisitorDumpLog();
     Udbus.Core.UdbusMessageVisitorMulti visitorMulti = new Udbus.Core.UdbusMessageVisitorMulti(visitorDump, visitor);
     return visitorMulti;
 }
开发者ID:rneilturner,项目名称:win-tools,代码行数:6,代码来源:DbusUtils.cs



注:本文中的Udbus类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# UdpClient类代码示例发布时间:2022-05-24
下一篇:
C# UVAnimation类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap