public PropertyEnumWriteStatus CacheThis(string namespace_tag, EnumWriteStatus val) { StringBuilder sb = new StringBuilder(); sb.AppendFormat("{0}{1}{2}", namespace_tag, Delimiter, val.ToString()); return((PropertyEnumWriteStatus)this.Cache.CacheThis(sb.ToString(), new PropertyEnumWriteStatus(namespace_tag, val))); }
/// <summary> /// Attempts to case compareToThis as an EnumWriteStatus /// to do the comparison. If the cast /// fails, then it compares the current /// value against EnumWriteStatus.MinValue. /// </summary> /// <param name="compareToThis"></param> /// <returns></returns> public int CompareTo(object compareToThis) { System.Type type = compareToThis.GetType(); EnumWriteStatus compareTo = (EnumWriteStatus)Enum.Parse(typeof(EnumWriteStatus), compareToThis.ToString(), true); int o1 = (int)this.m_value; int o2 = (int)compareTo; return(o1.CompareTo(o2)); }
public PropertyEnumWriteStatus CacheThis(string namespace_tag, EnumWriteStatus val) { StringBuilder sb = new StringBuilder(); sb.AppendFormat("{0}{1}{2}", namespace_tag, Delimiter, val.ToString()); return (PropertyEnumWriteStatus) this.Cache.CacheThis(sb.ToString(), new PropertyEnumWriteStatus(namespace_tag, val)); }
/// <summary> /// Instantiates a new property that can represent an xml element with /// the EnumWriteStatus enumeration as its value. /// </summary> /// <param name="namespace_tag">property obtained from Tags[CommonPropertyNames.value]</param> /// <param name="val"></param> public PropertyEnumWriteStatus(string namespace_tag, EnumWriteStatus val) { this.ns_tag = (string)CdsMetadataCaches.Didl.CacheThis(namespace_tag); this.m_value = val; }
/// <summary> /// The ability to modify objects directly to a container/item is not available /// for a public programmer. Each CpMediaItem object is responsible /// for maintaining its own state. /// </summary> /// <param name="writeStatus"></param> public override void SetWriteStatus(EnumWriteStatus writeStatus) { this.CheckRuntimeBindings(new StackTrace()); base.SetWriteStatus(writeStatus); }
/// <summary> /// Throws an exception. CpRootCollectionContainers /// are not like normal containers because they /// aggregate root containers. For this reason /// the ability to modify properties, resources, /// and metadata is NEVER allowed since /// there is no actual metadata to retrieve or set. /// </summary> /// <param name="writeStatus"></param> public override void SetWriteStatus(EnumWriteStatus writeStatus) { CheckProtection(); }
/// <summary> /// Media entries can indicate if they allow control points to /// overwrite resources. /// </summary> /// <param name="writeStatus">the writeStatus value to apply to this object</param> public virtual void SetWriteStatus(EnumWriteStatus writeStatus) { PropertyEnumWriteStatus[] ar = new PropertyEnumWriteStatus[1]; ar[0] = CdsMetadataCaches.PropertyEnumWriteStatus.CacheThis(T[_UPNP.writeStatus], writeStatus); this.m_Properties[T[_UPNP.writeStatus]] = ar; }
/// <summary> /// Instantiates a new property that can represent an xml element with /// the EnumWriteStatus enumeration as its value. /// </summary> /// <param name="namespace_tag">property obtained from Tags[CommonPropertyNames.value]</param> /// <param name="val"></param> public PropertyEnumWriteStatus (string namespace_tag, EnumWriteStatus val) { this.ns_tag = (string) CdsMetadataCaches.Didl.CacheThis(namespace_tag); this.m_value = val; }