Exemple #1
0
        public void RemoveValueDescription(string name)
        {
            VdfValueDesc valDesc;

            if (ValueDescTable.TryGetValue(name, out valDesc))
            {
                if (valDesc.Owners.Count > 0)
                {
                    StringBuilder sb = new StringBuilder();
                    sb.AppendFormat("Value Description {0} has following owners:\n", name);
                    foreach (var obj in valDesc.Owners)
                    {
                        sb.Append('\t');
                        sb.AppendLine(obj.ToString());
                    }
                    throw new VdfException(sb.ToString());
                }
                else
                {
                    ValueDescTable.Remove(name);
                }
            }
            else
            {
                throw new VdfException("Named " + name + " Value Description Does Not Exist!");
            }
        }
Exemple #2
0
 public VdfValueDesc ValueDesc(string vdName)
 {
     if (ValueDescTable.TryGetValue(vdName, out VdfValueDesc desc))
     {
         return(desc);
     }
     return(null);
 }