當前位置: 首頁>>代碼示例>>C#>>正文


C# Aplus.GetService方法代碼示例

本文整理匯總了C#中Aplus.GetService方法的典型用法代碼示例。如果您正苦於以下問題:C# Aplus.GetService方法的具體用法?C# Aplus.GetService怎麽用?C# Aplus.GetService使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Aplus的用法示例。


在下文中一共展示了Aplus.GetService方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ListenN

        public static AType ListenN(Aplus environment, AType name, AType function)
        {
            if (name.Type != ATypes.ASymbol || function.Type != ATypes.AFunc)
            {
                return AInteger.Create(-1);
            }

            return environment.GetService<AipcService>().Listen(function, name);
        }
開發者ID:sammoorhouse,項目名稱:aplusdotnet,代碼行數:9,代碼來源:ContextI.cs

示例2: ListenNPP

        public static AType ListenNPP(Aplus environment, AType protocol, AType port, AType name, AType function)
        {
            int portNumber = ExtractInteger(port, "i.listenNPP");

            if (protocol.Type != ATypes.ASymbol || name.Type != ATypes.ASymbol || function.Type != ATypes.AFunc)
            {
                return AInteger.Create(-1);
            }

            return environment.GetService<AipcService>().Listen(
                function, name, ConnectionAttribute.DEFAULT_HOST, portNumber, protocol);
        }
開發者ID:sammoorhouse,項目名稱:aplusdotnet,代碼行數:12,代碼來源:ContextI.cs

示例3: ConnectNHPP

 public static AType ConnectNHPP(
     Aplus environment, AType protocol, AType port, AType host, AType name, AType function)
 {
     int portNumber = ExtractInteger(port, "connectNHPP");
     return environment.GetService<AipcService>().Connect(function, name, host, portNumber, protocol);
 }
開發者ID:sammoorhouse,項目名稱:aplusdotnet,代碼行數:6,代碼來源:ContextI.cs

示例4: Close

 public static AType Close(Aplus environment, AType handle)
 {
     int handleNumber = ExtractInteger(handle, "i.close");
     return environment.GetService<AipcService>().Close(handleNumber);
 }
開發者ID:sammoorhouse,項目名稱:aplusdotnet,代碼行數:5,代碼來源:ContextI.cs

示例5: Open

 public static AType Open(Aplus environment, AType handle)
 {
     int handleNumber = ExtractInteger(handle, "i.open");
     return environment.GetService<AipcService>().Open(handleNumber);
 }
開發者ID:sammoorhouse,項目名稱:aplusdotnet,代碼行數:5,代碼來源:ContextI.cs

示例6: Destroy

 public static AType Destroy(Aplus environment, AType handle)
 {
     int handleNumber = ExtractInteger(handle, "i.destroy");
     return environment.GetService<AipcService>().Destroy(handleNumber);
 }
開發者ID:sammoorhouse,項目名稱:aplusdotnet,代碼行數:5,代碼來源:ContextI.cs

示例7: SyncRead

 public static AType SyncRead(Aplus environment, AType timeout, AType handle)
 {
     int handleNumber = ExtractInteger(handle, "i.syncread");
     return environment.GetService<AipcService>().SyncRead(handleNumber, timeout);
 }
開發者ID:sammoorhouse,項目名稱:aplusdotnet,代碼行數:5,代碼來源:ContextI.cs

示例8: Send

 public static AType Send(Aplus environment, AType message, AType handle)
 {
     int handleNumber = ExtractInteger(handle, "i.send");
     return environment.GetService<AipcService>().Send(handleNumber, message);
 }
開發者ID:sammoorhouse,項目名稱:aplusdotnet,代碼行數:5,代碼來源:ContextI.cs

示例9: WhatIs

 public static AType WhatIs(Aplus environment, AType handle)
 {
     int handleNumber = ExtractInteger(handle, "i.whatis");
     return environment.GetService<AipcService>().WhatIs(handleNumber);
 }
開發者ID:sammoorhouse,項目名稱:aplusdotnet,代碼行數:5,代碼來源:ContextI.cs

示例10: SetAttribute

        public static AType SetAttribute(Aplus environment, AType value, AType attributeName, AType handle)
        {
            ExtractInteger(handle, "i.setattr");

            return environment.GetService<AipcService>().SetAttribute(handle.asInteger, attributeName, value);
        }
開發者ID:sammoorhouse,項目名稱:aplusdotnet,代碼行數:6,代碼來源:ContextI.cs

示例11: GetAttribute

 public static AType GetAttribute(Aplus environment, AType attributeName, AType handle)
 {
     int handleNumber = ExtractInteger(handle, "i.getattr");
     return environment.GetService<AipcService>().GetAttribute(handleNumber, attributeName);
 }
開發者ID:sammoorhouse,項目名稱:aplusdotnet,代碼行數:5,代碼來源:ContextI.cs

示例12: Attributes

 public static AType Attributes(Aplus environment, AType handle)
 {
     int handleNumber = ExtractInteger(handle, "i.attrs");
     return environment.GetService<AipcService>().Attributes(handleNumber);
 }
開發者ID:sammoorhouse,項目名稱:aplusdotnet,代碼行數:5,代碼來源:ContextI.cs

示例13: Timeout

 public static AType Timeout(Aplus environment, AType argument)
 {
     return environment.GetService<AipcService>().GetTimeout(argument);
 }
開發者ID:sammoorhouse,項目名稱:aplusdotnet,代碼行數:4,代碼來源:ContextI.cs

示例14: ConnectN

 public static AType ConnectN(Aplus environment, AType name, AType function)
 {
     return environment.GetService<AipcService>().Connect(function, name);
 }
開發者ID:sammoorhouse,項目名稱:aplusdotnet,代碼行數:4,代碼來源:ContextI.cs


注:本文中的Aplus.GetService方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。