/// <summary> /// Enable the ChannelMap property. /// </summary> public void EnablePropertyChannelMap() { List <String> allowedValues = new List <String>(); iPropertyChannelMap = new PropertyString(new ParameterString("ChannelMap", allowedValues)); AddProperty(iPropertyChannelMap); }
/// <summary> /// Enable the AudioChannels property. /// </summary> public void EnablePropertyAudioChannels() { List <String> allowedValues = new List <String>(); iPropertyAudioChannels = new PropertyString(new ParameterString("AudioChannels", allowedValues)); AddProperty(iPropertyAudioChannels); }
/// <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 CpProxyLinnCoUkExaktInputs1(ICpDevice aDevice) : base("linn-co-uk", "ExaktInputs", 1, aDevice) { OpenHome.Net.Core.Parameter param; List <String> allowedValues = new List <String>(); iActionGetAssociation = new OpenHome.Net.Core.Action("GetAssociation"); param = new ParameterUint("InputIndex"); iActionGetAssociation.AddInputParameter(param); param = new ParameterString("DeviceId", allowedValues); iActionGetAssociation.AddOutputParameter(param); iActionSetAssociation = new OpenHome.Net.Core.Action("SetAssociation"); param = new ParameterUint("InputIndex"); iActionSetAssociation.AddInputParameter(param); param = new ParameterString("DeviceId", allowedValues); iActionSetAssociation.AddInputParameter(param); iActionClearAssociation = new OpenHome.Net.Core.Action("ClearAssociation"); param = new ParameterUint("InputIndex"); iActionClearAssociation.AddInputParameter(param); iActionInputCount = new OpenHome.Net.Core.Action("InputCount"); param = new ParameterUint("InputCount"); iActionInputCount.AddOutputParameter(param); iAssociations = new PropertyString("Associations", AssociationsPropertyChanged); AddProperty(iAssociations); iPropertyLock = new Mutex(); }
/// <summary> /// Enable the DeviceList property. /// </summary> public void EnablePropertyDeviceList() { List <String> allowedValues = new List <String>(); iPropertyDeviceList = new PropertyString(new ParameterString("DeviceList", allowedValues)); AddProperty(iPropertyDeviceList); }
public void RemoveProperty(PropertyString property) { if (Biota.TryRemoveProperty(property, BiotaDatabaseLock, biotaPropertyStrings)) { ChangesDetected = true; } }
/// <summary> /// Enable the Uri property. /// </summary> public void EnablePropertyUri() { List <String> allowedValues = new List <String>(); iPropertyUri = new PropertyString(new ParameterString("Uri", allowedValues)); AddProperty(iPropertyUri); }
private static EndpointAddress getEndPoint(PropertyString connectionProperties, bool isWindowsCredential) { EndpointAddress endPointAddress; Uri uri = new Uri(connectionProperties.GetString("Uri", true)); if (isWindowsCredential) { string upnIdentity = connectionProperties.GetString("UPNIdentity", false); if (!String.IsNullOrEmpty(upnIdentity)) { endPointAddress = new EndpointAddress(uri, EndpointIdentity.CreateUpnIdentity(upnIdentity)); } else { string spnIdentity = connectionProperties.GetString("SPNIdentity", false); if (!String.IsNullOrEmpty(spnIdentity)) { endPointAddress = new EndpointAddress(uri, EndpointIdentity.CreateSpnIdentity(upnIdentity)); } else { endPointAddress = new EndpointAddress(uri); } } } else { endPointAddress = new EndpointAddress(uri); } return(endPointAddress); }
/// <summary> /// Enable the ParameterXml property. /// </summary> public void EnablePropertyParameterXml() { List <String> allowedValues = new List <String>(); iPropertyParameterXml = new PropertyString(new ParameterString("ParameterXml", allowedValues)); AddProperty(iPropertyParameterXml); }
/// <summary> /// Enable the PolicyDetails property. /// </summary> public void EnablePropertyPolicyDetails() { List <String> allowedValues = new List <String>(); iPropertyPolicyDetails = new PropertyString(new ParameterString("PolicyDetails", allowedValues)); AddProperty(iPropertyPolicyDetails); }
/// <summary> /// Enable the ConnectionStatus property. /// </summary> public void EnablePropertyConnectionStatus() { List <String> allowedValues = new List <String>(); iPropertyConnectionStatus = new PropertyString(new ParameterString("ConnectionStatus", allowedValues)); AddProperty(iPropertyConnectionStatus); }
protected override void SetupEditControls() { var propertyUrl = new PropertyString { Value = OptionsData.Url }; var propertyWidth = new PropertyNumber { Value = OptionsData.MaxWidth }; var propertyHeight = new PropertyNumber { Value = OptionsData.MaxHeight }; propertyUrlControl = new Property(propertyUrl) { EditMode = true }; propertyWidthControl = new Property(propertyWidth) { EditMode = true }; propertyHeightControl = new Property(propertyHeight) { EditMode = true }; CreateAndAddControls(propertyUrlControl, "Url to video, photo etc"); CreateAndAddControls(propertyWidthControl, "Max width"); CreateAndAddControls(propertyHeightControl, "Max height"); }
/// <summary> /// Enable the Version property. /// </summary> public void EnablePropertyVersion() { List <String> allowedValues = new List <String>(); iPropertyVersion = new PropertyString(new ParameterString("Version", allowedValues)); AddProperty(iPropertyVersion); }
/// <summary> /// Enable the UpdateTopic property. /// </summary> public void EnablePropertyUpdateTopic() { List <String> allowedValues = new List <String>(); iPropertyUpdateTopic = new PropertyString(new ParameterString("UpdateTopic", allowedValues)); AddProperty(iPropertyUpdateTopic); }
/// <summary> /// Enable the Associations property. /// </summary> public void EnablePropertyAssociations() { List <String> allowedValues = new List <String>(); iPropertyAssociations = new PropertyString(new ParameterString("Associations", allowedValues)); AddProperty(iPropertyAssociations); }
/// <summary> /// Enable the SinkProtocolInfo property. /// </summary> public void EnablePropertySinkProtocolInfo() { List <String> allowedValues = new List <String>(); iPropertySinkProtocolInfo = new PropertyString(new ParameterString("SinkProtocolInfo", allowedValues)); AddProperty(iPropertySinkProtocolInfo); }
/// <summary> /// Enable the CurrentConnectionIDs property. /// </summary> public void EnablePropertyCurrentConnectionIDs() { List <String> allowedValues = new List <String>(); iPropertyCurrentConnectionIDs = new PropertyString(new ParameterString("CurrentConnectionIDs", allowedValues)); AddProperty(iPropertyCurrentConnectionIDs); }
/// <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 CpProxyLinnCoUkConfiguration1(ICpDevice aDevice) : base("linn-co-uk", "Configuration", 1, aDevice) { OpenHome.Net.Core.Parameter param; List <String> allowedValues = new List <String>(); iActionConfigurationXml = new OpenHome.Net.Core.Action("ConfigurationXml"); param = new ParameterString("aConfigurationXml", allowedValues); iActionConfigurationXml.AddOutputParameter(param); iActionParameterXml = new OpenHome.Net.Core.Action("ParameterXml"); param = new ParameterString("aParameterXml", allowedValues); iActionParameterXml.AddOutputParameter(param); iActionSetParameter = new OpenHome.Net.Core.Action("SetParameter"); param = new ParameterString("aTarget", allowedValues); iActionSetParameter.AddInputParameter(param); param = new ParameterString("aName", allowedValues); iActionSetParameter.AddInputParameter(param); param = new ParameterString("aValue", allowedValues); iActionSetParameter.AddInputParameter(param); iConfigurationXml = new PropertyString("ConfigurationXml", ConfigurationXmlPropertyChanged); AddProperty(iConfigurationXml); iParameterXml = new PropertyString("ParameterXml", ParameterXmlPropertyChanged); AddProperty(iParameterXml); iPropertyLock = new Mutex(); }
/// <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 CpProxyLinnCoUkPrivacy1(ICpDevice aDevice) : base("linn-co-uk", "Privacy", 1, aDevice) { OpenHome.Net.Core.Parameter param; List <String> allowedValues = new List <String>(); iActionGetPolicyVersion = new OpenHome.Net.Core.Action("GetPolicyVersion"); param = new ParameterUint("Version"); iActionGetPolicyVersion.AddOutputParameter(param); iActionGetPolicyAgreed = new OpenHome.Net.Core.Action("GetPolicyAgreed"); param = new ParameterUint("Version"); iActionGetPolicyAgreed.AddOutputParameter(param); iActionGetPolicyDetails = new OpenHome.Net.Core.Action("GetPolicyDetails"); param = new ParameterString("Details", allowedValues); iActionGetPolicyDetails.AddOutputParameter(param); iActionSetPolicyDetails = new OpenHome.Net.Core.Action("SetPolicyDetails"); param = new ParameterString("Details", allowedValues); iActionSetPolicyDetails.AddInputParameter(param); iPolicyVersion = new PropertyUint("PolicyVersion", PolicyVersionPropertyChanged); AddProperty(iPolicyVersion); iPolicyAgreed = new PropertyUint("PolicyAgreed", PolicyAgreedPropertyChanged); AddProperty(iPolicyAgreed); iPolicyDetails = new PropertyString("PolicyDetails", PolicyDetailsPropertyChanged); AddProperty(iPolicyDetails); iPropertyLock = new Mutex(); }
private static NetTcpBinding getBinding(PropertyString connectionProperties, out bool isWindowsCredential) { SecurityMode securityMode = connectionProperties.GetEnum <SecurityMode>("SecurityMode", true); NetTcpBinding binding = new NetTcpBinding(securityMode, false); binding.OpenTimeout = connectionProperties.GetOptional("OpenTimeout", TimeSpan.FromSeconds(defaultTimeoutSeconds)); binding.CloseTimeout = connectionProperties.GetOptional("CloseTimeout", TimeSpan.FromSeconds(defaultTimeoutSeconds)); binding.ReceiveTimeout = connectionProperties.GetOptional("RecieveTimeout", TimeSpan.FromSeconds(defaultTimeoutSeconds)); binding.SendTimeout = connectionProperties.GetOptional("SendTimeout", TimeSpan.FromSeconds(defaultTimeoutSeconds)); binding.MaxReceivedMessageSize = connectionProperties.GetOptional("MaxReceivedMessageSize", defaultMaxReceivedMessageSize); binding.MaxBufferSize = connectionProperties.GetOptional("MaxBufferSize", defaultMaxBufferSize); binding.ReaderQuotas.MaxStringContentLength = connectionProperties.GetOptional("MaxStringContentLength", defaultMaxStringContentLength); binding.ReaderQuotas.MaxArrayLength = connectionProperties.GetOptional("MaxArrayLength", defaultMaxArrayLength); binding.ReaderQuotas.MaxBytesPerRead = connectionProperties.GetOptional("MaxBytesPerRead", defaultMaxBytesPerRead); switch (securityMode) { case SecurityMode.Message: binding.Security.Message.ClientCredentialType = connectionProperties.GetEnum <MessageCredentialType>("MessageCredentialType", false); isWindowsCredential = binding.Security.Message.ClientCredentialType == MessageCredentialType.Windows; break; case SecurityMode.Transport: binding.Security.Transport.ClientCredentialType = connectionProperties.GetEnum <TcpClientCredentialType>("ClientCredentialType", false); isWindowsCredential = binding.Security.Transport.ClientCredentialType == TcpClientCredentialType.Windows; break; default: isWindowsCredential = false; break; } return(binding); }
/// <summary> /// Enable the CodecName property. /// </summary> public void EnablePropertyCodecName() { List <String> allowedValues = new List <String>(); iPropertyCodecName = new PropertyString(new ParameterString("CodecName", allowedValues)); AddProperty(iPropertyCodecName); }
/// <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(); }
public GameMessagePrivateUpdatePropertyString(Session session, PropertyString property, string value) : base(GameMessageOpcode.PrivateUpdatePropertyString, GameMessageGroup.UIQueue) { Writer.Write(session.Player.Sequences.GetNextSequence(Sequence.SequenceType.PrivateUpdatePropertyString)); Writer.Write((uint)property); Writer.WriteString16L(value); }
/// <summary> /// Enable the PublicKey property. /// </summary> public void EnablePropertyPublicKey() { List <String> allowedValues = new List <String>(); iPropertyPublicKey = new PropertyString(new ParameterString("PublicKey", allowedValues)); AddProperty(iPropertyPublicKey); }
public static bool TryRemoveProperty(this Biota biota, PropertyString property, out BiotaPropertiesString entity, ReaderWriterLockSlim rwLock) { rwLock.EnterUpgradeableReadLock(); try { entity = biota.BiotaPropertiesString.FirstOrDefault(x => x.Type == (uint)property); if (entity != null) { rwLock.EnterWriteLock(); try { biota.BiotaPropertiesString.Remove(entity); entity.Object = null; return(true); } finally { rwLock.ExitWriteLock(); } } return(false); } finally { rwLock.ExitUpgradeableReadLock(); } }
/// <summary> /// Enable the Ids property. /// </summary> public void EnablePropertyIds() { List <String> allowedValues = new List <String>(); iPropertyIds = new PropertyString(new ParameterString("Ids", allowedValues)); AddProperty(iPropertyIds); }
public static void SetProperty(this Biota biota, PropertyString property, string value, ReaderWriterLockSlim rwLock) { rwLock.EnterUpgradeableReadLock(); try { var result = biota.BiotaPropertiesString.FirstOrDefault(x => x.Type == (uint)property); if (result != null) { result.Value = value; } else { rwLock.EnterWriteLock(); try { var entity = new BiotaPropertiesString { ObjectId = biota.Id, Type = (ushort)property, Value = value, Object = biota }; biota.BiotaPropertiesString.Add(entity); } finally { rwLock.ExitWriteLock(); } } } finally { rwLock.ExitUpgradeableReadLock(); } }
/// <summary> /// Enable the Metadata property. /// </summary> public void EnablePropertyMetadata() { List <String> allowedValues = new List <String>(); iPropertyMetadata = new PropertyString(new ParameterString("Metadata", allowedValues)); AddProperty(iPropertyMetadata); }
/// <summary> /// Enable the PresentationUrl property. /// </summary> public void EnablePropertyPresentationUrl() { List <String> allowedValues = new List <String>(); iPropertyPresentationUrl = new PropertyString(new ParameterString("PresentationUrl", allowedValues)); AddProperty(iPropertyPresentationUrl); }
/// <summary>Gets the value.</summary> /// <value>The value.</value> public double Value(int arrayIndex = -1) { object s = locator.Get(PropertyName); string PropertyString; if (s == null) { PropertyString = ""; } else if (s is Array) { PropertyString = (string)(s as Array).GetValue(arrayIndex); } else if (s is IFunction) { PropertyString = (s as IFunction).Value(arrayIndex).ToString(); } else { PropertyString = (string)s; } bool stringCompareTrue = PropertyString.Equals(StringValue, StringComparison.CurrentCultureIgnoreCase); if (stringCompareTrue) { return(TrueValue.Value(arrayIndex)); } else { return(FalseValue.Value(arrayIndex)); } }
public void SetProperty(PropertyString property, string value) { Biota.SetProperty(property, value, BiotaDatabaseLock, biotaPropertyStrings, out var biotaChanged); if (biotaChanged) { ChangesDetected = true; } }
protected override void SetupEditControls() { var propertyUrl = new PropertyString { Value = OptionsData.Url }; var propertyWidth = new PropertyNumber { Value = OptionsData.MaxWidth }; var propertyHeight = new PropertyNumber { Value = OptionsData.MaxHeight }; propertyUrlControl = new Property(propertyUrl) { EditMode = true }; propertyWidthControl = new Property(propertyWidth) { EditMode = true }; propertyHeightControl = new Property(propertyHeight) { EditMode = true }; CreateAndAddControls(propertyUrlControl, "Url to video, photo etc"); CreateAndAddControls(propertyWidthControl, "Max width"); CreateAndAddControls(propertyHeightControl, "Max height"); }
public oEmbedPlugin() { url = new PropertyString { Name = "Url to video, photo etc" }; width = new PropertyNumber { Name = "Max width" }; height = new PropertyNumber { Name = "Max height" }; }