当前位置: 首页>>代码示例>>C#>>正文


C# Action.AddInputParameter方法代码示例

本文整理汇总了C#中OpenHome.Net.Core.Action.AddInputParameter方法的典型用法代码示例。如果您正苦于以下问题:C# Action.AddInputParameter方法的具体用法?C# Action.AddInputParameter怎么用?C# Action.AddInputParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OpenHome.Net.Core.Action的用法示例。


在下文中一共展示了Action.AddInputParameter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例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: 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

示例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: EnableActionGetCurrentConnectionInfo

 /// <summary>
 /// Signal that the action GetCurrentConnectionInfo is supported.
 /// </summary>
 /// <remarks>The action's availability will be published in the device's service.xml.
 /// GetCurrentConnectionInfo must be overridden if this is called.</remarks>
 protected void EnableActionGetCurrentConnectionInfo()
 {
     OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("GetCurrentConnectionInfo");
     List<String> allowedValues = new List<String>();
     action.AddInputParameter(new ParameterInt("ConnectionID"));
     action.AddOutputParameter(new ParameterInt("RcsID"));
     action.AddOutputParameter(new ParameterInt("AVTransportID"));
     action.AddOutputParameter(new ParameterString("ProtocolInfo", allowedValues));
     action.AddOutputParameter(new ParameterString("PeerConnectionManager", allowedValues));
     action.AddOutputParameter(new ParameterInt("PeerConnectionID"));
     allowedValues.Add("Input");
     allowedValues.Add("Output");
     action.AddOutputParameter(new ParameterString("Direction", allowedValues));
     allowedValues.Clear();
     allowedValues.Add("OK");
     allowedValues.Add("ContentFormatMismatch");
     allowedValues.Add("InsufficientBandwidth");
     allowedValues.Add("UnreliableChannel");
     allowedValues.Add("Unknown");
     action.AddOutputParameter(new ParameterString("Status", allowedValues));
     allowedValues.Clear();
     iDelegateGetCurrentConnectionInfo = new ActionDelegate(DoGetCurrentConnectionInfo);
     EnableAction(action, iDelegateGetCurrentConnectionInfo, GCHandle.ToIntPtr(iGch));
 }
开发者ID:openhome,项目名称:ohNet,代码行数:29,代码来源:DvUpnpOrgConnectionManager1.cs

示例11: EnableActionSetVolumeDB

 /// <summary>
 /// Signal that the action SetVolumeDB is supported.
 /// </summary>
 /// <remarks>The action's availability will be published in the device's service.xml.
 /// SetVolumeDB must be overridden if this is called.</remarks>
 protected void EnableActionSetVolumeDB()
 {
     OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("SetVolumeDB");
     List<String> allowedValues = new List<String>();
     action.AddInputParameter(new ParameterUint("InstanceID"));
     action.AddInputParameter(new ParameterString("Channel", allowedValues));
     action.AddInputParameter(new ParameterInt("DesiredVolume"));
     iDelegateSetVolumeDB = new ActionDelegate(DoSetVolumeDB);
     EnableAction(action, iDelegateSetVolumeDB, GCHandle.ToIntPtr(iGch));
 }
开发者ID:Wodath,项目名称:ohNet,代码行数:15,代码来源:DvUpnpOrgRenderingControl2.cs

示例12: EnableActionSetStateVariables

 /// <summary>
 /// Signal that the action SetStateVariables is supported.
 /// </summary>
 /// <remarks>The action's availability will be published in the device's service.xml.
 /// SetStateVariables must be overridden if this is called.</remarks>
 protected void EnableActionSetStateVariables()
 {
     OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("SetStateVariables");
     List<String> allowedValues = new List<String>();
     action.AddInputParameter(new ParameterUint("InstanceID"));
     action.AddInputParameter(new ParameterString("RenderingControlUDN", allowedValues));
     action.AddInputParameter(new ParameterString("ServiceType", allowedValues));
     action.AddInputParameter(new ParameterString("ServiceId", allowedValues));
     action.AddInputParameter(new ParameterString("StateVariableValuePairs", allowedValues));
     action.AddOutputParameter(new ParameterString("StateVariableList", allowedValues));
     iDelegateSetStateVariables = new ActionDelegate(DoSetStateVariables);
     EnableAction(action, iDelegateSetStateVariables, GCHandle.ToIntPtr(iGch));
 }
开发者ID:Wodath,项目名称:ohNet,代码行数:18,代码来源:DvUpnpOrgRenderingControl2.cs

示例13: EnableActionSetRedVideoGain

 /// <summary>
 /// Signal that the action SetRedVideoGain is supported.
 /// </summary>
 /// <remarks>The action's availability will be published in the device's service.xml.
 /// SetRedVideoGain must be overridden if this is called.</remarks>
 protected void EnableActionSetRedVideoGain()
 {
     OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("SetRedVideoGain");
     action.AddInputParameter(new ParameterUint("InstanceID"));
     action.AddInputParameter(new ParameterUint("DesiredRedVideoGain", 0, 2147483647, 1));
     iDelegateSetRedVideoGain = new ActionDelegate(DoSetRedVideoGain);
     EnableAction(action, iDelegateSetRedVideoGain, GCHandle.ToIntPtr(iGch));
 }
开发者ID:Wodath,项目名称:ohNet,代码行数:13,代码来源:DvUpnpOrgRenderingControl2.cs

示例14: 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

示例15: 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


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