Пример #1
0
        bool StateVariableNameConflict(string name, Type dataType)
        {
            if (!RelatedStateVariables.ContainsKey(name))
            {
                return(false);
            }
            var variable = RelatedStateVariables[name];

            return(variable.DataType != dataType || variable.SendEvents == true);
        }
Пример #2
0
        protected virtual void AddRelatedStateVariable(RelatedStateVariable relatedStateVariable)
        {
            if (relatedStateVariable != null)
            {
                if (RelatedStateVariables.ContainsKey(relatedStateVariable.Name))
                {
                    throw new UpnpServerException(string.Format("The service already contains an state variable named '{0}'.", stateVariable.Name));
                }

                RelatedStateVariables.Add(relatedStateVariable.Name, relatedStateVariable);
            }
        }