bool StateVariableNameConflict(string name, Type dataType) { if (!RelatedStateVariables.ContainsKey(name)) { return(false); } var variable = RelatedStateVariables[name]; return(variable.DataType != dataType || variable.SendEvents == true); }
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); } }