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


C# Core.Action類代碼示例

本文整理匯總了C#中OpenHome.Net.Core.Action的典型用法代碼示例。如果您正苦於以下問題:C# Action類的具體用法?C# Action怎麽用?C# Action使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Action類屬於OpenHome.Net.Core命名空間,在下文中一共展示了Action類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: CpProxyAvOpenhomeOrgNetworkMonitor1

        /// <summary>
        /// Constructor
        /// </summary>
        /// <remarks>Use CpProxy::[Un]Subscribe() to enable/disable querying of state variable and reporting of their changes.</remarks>
        /// <param name="aDevice">The device to use</param>
        public CpProxyAvOpenhomeOrgNetworkMonitor1(CpDevice aDevice)
            : base("av-openhome-org", "NetworkMonitor", 1, aDevice)
        {
            OpenHome.Net.Core.Parameter param;
            List<String> allowedValues = new List<String>();

            iActionName = new OpenHome.Net.Core.Action("Name");
            param = new ParameterString("Name", allowedValues);
            iActionName.AddOutputParameter(param);

            iActionPorts = new OpenHome.Net.Core.Action("Ports");
            param = new ParameterUint("Sender");
            iActionPorts.AddOutputParameter(param);
            param = new ParameterUint("Receiver");
            iActionPorts.AddOutputParameter(param);
            param = new ParameterUint("Results");
            iActionPorts.AddOutputParameter(param);

            iName = new PropertyString("Name", NamePropertyChanged);
            AddProperty(iName);
            iSender = new PropertyUint("Sender", SenderPropertyChanged);
            AddProperty(iSender);
            iReceiver = new PropertyUint("Receiver", ReceiverPropertyChanged);
            AddProperty(iReceiver);
            iResults = new PropertyUint("Results", ResultsPropertyChanged);
            AddProperty(iResults);

            iPropertyLock = new Mutex();
        }
開發者ID:nterry,項目名稱:ohNet,代碼行數:34,代碼來源:CpAvOpenhomeOrgNetworkMonitor1.cs

示例2: EnableActionGetColor

 /// <summary>
 /// Signal that the action GetColor is supported.
 /// </summary>
 /// <remarks>The action's availability will be published in the device's service.xml.
 /// GetColor must be overridden if this is called.</remarks>
 protected void EnableActionGetColor()
 {
     OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("GetColor");
     action.AddInputParameter(new ParameterUint("Index"));
     action.AddOutputParameter(new ParameterUint("Color"));
     iDelegateGetColor = new ActionDelegate(DoGetColor);
     EnableAction(action, iDelegateGetColor, GCHandle.ToIntPtr(iGch));
 }
開發者ID:nterry,項目名稱:ohNet,代碼行數:13,代碼來源:DvOpenhomeOrgTestLights1.cs

示例3: EnableActionUnsubscribe

 /// <summary>
 /// Signal that the action Unsubscribe is supported.
 /// </summary>
 /// <remarks>The action's availability will be published in the device's service.xml.
 /// Unsubscribe must be overridden if this is called.</remarks>
 protected void EnableActionUnsubscribe()
 {
     OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("Unsubscribe");
     List<String> allowedValues = new List<String>();
     action.AddInputParameter(new ParameterString("Sid", allowedValues));
     iDelegateUnsubscribe = new ActionDelegate(DoUnsubscribe);
     EnableAction(action, iDelegateUnsubscribe, GCHandle.ToIntPtr(iGch));
 }
開發者ID:MatthewMiddleweek,項目名稱:ohNet,代碼行數:13,代碼來源:DvOpenhomeOrgSubscriptionLongPoll1.cs

示例4: EnableActionGetPropertyUpdates

 /// <summary>
 /// Signal that the action GetPropertyUpdates is supported.
 /// </summary>
 /// <remarks>The action's availability will be published in the device's service.xml.
 /// GetPropertyUpdates must be overridden if this is called.</remarks>
 protected void EnableActionGetPropertyUpdates()
 {
     OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("GetPropertyUpdates");
     List<String> allowedValues = new List<String>();
     action.AddInputParameter(new ParameterString("ClientId", allowedValues));
     action.AddOutputParameter(new ParameterString("Updates", allowedValues));
     iDelegateGetPropertyUpdates = new ActionDelegate(DoGetPropertyUpdates);
     EnableAction(action, iDelegateGetPropertyUpdates, GCHandle.ToIntPtr(iGch));
 }
開發者ID:openhome,項目名稱:ohNet,代碼行數:14,代碼來源:DvOpenhomeOrgSubscriptionLongPoll1.cs

示例5: EnableActionRenew

 /// <summary>
 /// Signal that the action Renew is supported.
 /// </summary>
 /// <remarks>The action's availability will be published in the device's service.xml.
 /// Renew must be overridden if this is called.</remarks>
 protected void EnableActionRenew()
 {
     OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("Renew");
     List<String> allowedValues = new List<String>();
     action.AddInputParameter(new ParameterString("Sid", allowedValues));
     action.AddInputParameter(new ParameterUint("RequestedDuration"));
     action.AddOutputParameter(new ParameterUint("Duration"));
     iDelegateRenew = new ActionDelegate(DoRenew);
     EnableAction(action, iDelegateRenew, GCHandle.ToIntPtr(iGch));
 }
開發者ID:openhome,項目名稱:ohNet,代碼行數:15,代碼來源:DvOpenhomeOrgSubscriptionLongPoll1.cs

示例6: EnableActionGetColorComponents

 /// <summary>
 /// Signal that the action GetColorComponents is supported.
 /// </summary>
 /// <remarks>The action's availability will be published in the device's service.xml.
 /// GetColorComponents must be overridden if this is called.</remarks>
 protected void EnableActionGetColorComponents()
 {
     OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("GetColorComponents");
     action.AddInputParameter(new ParameterUint("Color"));
     action.AddOutputParameter(new ParameterUint("Brightness"));
     action.AddOutputParameter(new ParameterUint("Red"));
     action.AddOutputParameter(new ParameterUint("Green"));
     action.AddOutputParameter(new ParameterUint("Blue"));
     iDelegateGetColorComponents = new ActionDelegate(DoGetColorComponents);
     EnableAction(action, iDelegateGetColorComponents, GCHandle.ToIntPtr(iGch));
 }
開發者ID:nterry,項目名稱:ohNet,代碼行數:16,代碼來源:DvOpenhomeOrgTestLights1.cs

示例7: EnableActionSubscribe

 /// <summary>
 /// Signal that the action Subscribe is supported.
 /// </summary>
 /// <remarks>The action's availability will be published in the device's service.xml.
 /// Subscribe must be overridden if this is called.</remarks>
 protected void EnableActionSubscribe()
 {
     OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("Subscribe");
     List<String> allowedValues = new List<String>();
     action.AddInputParameter(new ParameterString("ClientId", allowedValues));
     action.AddInputParameter(new ParameterString("Udn", allowedValues));
     action.AddInputParameter(new ParameterString("Service", allowedValues));
     action.AddInputParameter(new ParameterUint("RequestedDuration"));
     action.AddOutputParameter(new ParameterString("Sid", allowedValues));
     action.AddOutputParameter(new ParameterUint("Duration"));
     iDelegateSubscribe = new ActionDelegate(DoSubscribe);
     EnableAction(action, iDelegateSubscribe, GCHandle.ToIntPtr(iGch));
 }
開發者ID:MatthewMiddleweek,項目名稱:ohNet,代碼行數:18,代碼來源:DvOpenhomeOrgSubscriptionLongPoll1.cs

示例8: CpProxyOpenhomeOrgTestDimmableLight1

        /// <summary>
        /// Constructor
        /// </summary>
        /// <remarks>Use CpProxy::[Un]Subscribe() to enable/disable querying of state variable and reporting of their changes.</remarks>
        /// <param name="aDevice">The device to use</param>
        public CpProxyOpenhomeOrgTestDimmableLight1(CpDevice aDevice)
            : base("openhome-org", "TestDimmableLight", 1, aDevice)
        {
            OpenHome.Net.Core.Parameter param;

            iActionGetLevel = new OpenHome.Net.Core.Action("GetLevel");
            param = new ParameterUint("Level");
            iActionGetLevel.AddOutputParameter(param);

            iActionSetLevel = new OpenHome.Net.Core.Action("SetLevel");
            param = new ParameterUint("Level");
            iActionSetLevel.AddInputParameter(param);

            iA_ARG_Level = new PropertyUint("A_ARG_Level", A_ARG_LevelPropertyChanged);
            AddProperty(iA_ARG_Level);

            iPropertyLock = new Mutex();
        }
開發者ID:wifigeek,項目名稱:ohNet,代碼行數:23,代碼來源:CpOpenhomeOrgTestDimmableLight1.cs

示例9: CpProxyUpnpOrgSwitchPower1

        /// <summary>
        /// Constructor
        /// </summary>
        /// <remarks>Use CpProxy::[Un]Subscribe() to enable/disable querying of state variable and reporting of their changes.</remarks>
        /// <param name="aDevice">The device to use</param>
        public CpProxyUpnpOrgSwitchPower1(CpDevice aDevice)
            : base("schemas-upnp-org", "SwitchPower", 1, aDevice)
        {
            OpenHome.Net.Core.Parameter param;

            iActionSetTarget = new OpenHome.Net.Core.Action("SetTarget");
            param = new ParameterBool("newTargetValue");
            iActionSetTarget.AddInputParameter(param);

            iActionGetTarget = new OpenHome.Net.Core.Action("GetTarget");
            param = new ParameterBool("RetTargetValue");
            iActionGetTarget.AddOutputParameter(param);

            iActionGetStatus = new OpenHome.Net.Core.Action("GetStatus");
            param = new ParameterBool("ResultStatus");
            iActionGetStatus.AddOutputParameter(param);

            iStatus = new PropertyBool("Status", StatusPropertyChanged);
            AddProperty(iStatus);

            iPropertyLock = new Mutex();
        }
開發者ID:wifigeek,項目名稱:ohNet,代碼行數:27,代碼來源:CpUpnpOrgSwitchPower1.cs

示例10: CpProxyAvOpenhomeOrgTime1

        /// <summary>
        /// Constructor
        /// </summary>
        /// <remarks>Use CpProxy::[Un]Subscribe() to enable/disable querying of state variable and reporting of their changes.</remarks>
        /// <param name="aDevice">The device to use</param>
        public CpProxyAvOpenhomeOrgTime1(CpDevice aDevice)
            : base("av-openhome-org", "Time", 1, aDevice)
        {
            OpenHome.Net.Core.Parameter param;

            iActionTime = new OpenHome.Net.Core.Action("Time");
            param = new ParameterUint("TrackCount");
            iActionTime.AddOutputParameter(param);
            param = new ParameterUint("Duration");
            iActionTime.AddOutputParameter(param);
            param = new ParameterUint("Seconds");
            iActionTime.AddOutputParameter(param);

            iTrackCount = new PropertyUint("TrackCount", TrackCountPropertyChanged);
            AddProperty(iTrackCount);
            iDuration = new PropertyUint("Duration", DurationPropertyChanged);
            AddProperty(iDuration);
            iSeconds = new PropertyUint("Seconds", SecondsPropertyChanged);
            AddProperty(iSeconds);

            iPropertyLock = new Mutex();
        }
開發者ID:nterry,項目名稱:ohNet,代碼行數:27,代碼來源:CpAvOpenhomeOrgTime1.cs

示例11: CpProxyOpenhomeOrgSubscriptionLongPoll1

        /// <summary>
        /// Constructor
        /// </summary>
        /// <remarks>Use CpProxy::[Un]Subscribe() to enable/disable querying of state variable and reporting of their changes.</remarks>
        /// <param name="aDevice">The device to use</param>
        public CpProxyOpenhomeOrgSubscriptionLongPoll1(CpDevice aDevice)
            : base("openhome-org", "SubscriptionLongPoll", 1, aDevice)
        {
            OpenHome.Net.Core.Parameter param;
            List<String> allowedValues = new List<String>();

            iActionSubscribe = new OpenHome.Net.Core.Action("Subscribe");
            param = new ParameterString("ClientId", allowedValues);
            iActionSubscribe.AddInputParameter(param);
            param = new ParameterString("Udn", allowedValues);
            iActionSubscribe.AddInputParameter(param);
            param = new ParameterString("Service", allowedValues);
            iActionSubscribe.AddInputParameter(param);
            param = new ParameterUint("RequestedDuration");
            iActionSubscribe.AddInputParameter(param);
            param = new ParameterString("Sid", allowedValues);
            iActionSubscribe.AddOutputParameter(param);
            param = new ParameterUint("Duration");
            iActionSubscribe.AddOutputParameter(param);

            iActionUnsubscribe = new OpenHome.Net.Core.Action("Unsubscribe");
            param = new ParameterString("Sid", allowedValues);
            iActionUnsubscribe.AddInputParameter(param);

            iActionRenew = new OpenHome.Net.Core.Action("Renew");
            param = new ParameterString("Sid", allowedValues);
            iActionRenew.AddInputParameter(param);
            param = new ParameterUint("RequestedDuration");
            iActionRenew.AddInputParameter(param);
            param = new ParameterUint("Duration");
            iActionRenew.AddOutputParameter(param);

            iActionGetPropertyUpdates = new OpenHome.Net.Core.Action("GetPropertyUpdates");
            param = new ParameterString("ClientId", allowedValues);
            iActionGetPropertyUpdates.AddInputParameter(param);
            param = new ParameterString("Updates", allowedValues);
            iActionGetPropertyUpdates.AddOutputParameter(param);
        }
開發者ID:nterry,項目名稱:ohNet,代碼行數:43,代碼來源:CpOpenhomeOrgSubscriptionLongPoll1.cs

示例12: EnableActionSetColorTemperature

 /// <summary>
 /// Signal that the action SetColorTemperature is supported.
 /// </summary>
 /// <remarks>The action's availability will be published in the device's service.xml.
 /// SetColorTemperature must be overridden if this is called.</remarks>
 protected void EnableActionSetColorTemperature()
 {
     OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("SetColorTemperature");
     action.AddInputParameter(new ParameterUint("InstanceID"));
     action.AddInputParameter(new ParameterUint("DesiredColorTemperature", 0, 2147483647, 1));
     iDelegateSetColorTemperature = new ActionDelegate(DoSetColorTemperature);
     EnableAction(action, iDelegateSetColorTemperature, GCHandle.ToIntPtr(iGch));
 }
開發者ID:Wodath,項目名稱:ohNet,代碼行數:13,代碼來源:DvUpnpOrgRenderingControl2.cs

示例13: EnableActionSetGreenVideoBlackLevel

 /// <summary>
 /// Signal that the action SetGreenVideoBlackLevel is supported.
 /// </summary>
 /// <remarks>The action's availability will be published in the device's service.xml.
 /// SetGreenVideoBlackLevel must be overridden if this is called.</remarks>
 protected void EnableActionSetGreenVideoBlackLevel()
 {
     OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("SetGreenVideoBlackLevel");
     action.AddInputParameter(new ParameterUint("InstanceID"));
     action.AddInputParameter(new ParameterUint("DesiredGreenVideoBlackLevel", 0, 2147483647, 1));
     iDelegateSetGreenVideoBlackLevel = new ActionDelegate(DoSetGreenVideoBlackLevel);
     EnableAction(action, iDelegateSetGreenVideoBlackLevel, GCHandle.ToIntPtr(iGch));
 }
開發者ID:Wodath,項目名稱:ohNet,代碼行數:13,代碼來源:DvUpnpOrgRenderingControl2.cs

示例14: EnableActionListPresets

 /// <summary>
 /// Signal that the action ListPresets is supported.
 /// </summary>
 /// <remarks>The action's availability will be published in the device's service.xml.
 /// ListPresets must be overridden if this is called.</remarks>
 protected void EnableActionListPresets()
 {
     OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("ListPresets");
     List<String> allowedValues = new List<String>();
     action.AddInputParameter(new ParameterUint("InstanceID"));
     action.AddOutputParameter(new ParameterString("CurrentPresetNameList", allowedValues));
     iDelegateListPresets = new ActionDelegate(DoListPresets);
     EnableAction(action, iDelegateListPresets, GCHandle.ToIntPtr(iGch));
 }
開發者ID:Wodath,項目名稱:ohNet,代碼行數:14,代碼來源:DvUpnpOrgRenderingControl2.cs

示例15: EnableActionSelectPreset

 /// <summary>
 /// Signal that the action SelectPreset is supported.
 /// </summary>
 /// <remarks>The action's availability will be published in the device's service.xml.
 /// SelectPreset must be overridden if this is called.</remarks>
 protected void EnableActionSelectPreset()
 {
     OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("SelectPreset");
     List<String> allowedValues = new List<String>();
     action.AddInputParameter(new ParameterUint("InstanceID"));
     action.AddInputParameter(new ParameterString("PresetName", allowedValues));
     iDelegateSelectPreset = new ActionDelegate(DoSelectPreset);
     EnableAction(action, iDelegateSelectPreset, GCHandle.ToIntPtr(iGch));
 }
開發者ID:Wodath,項目名稱:ohNet,代碼行數:14,代碼來源:DvUpnpOrgRenderingControl2.cs


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