Exemplo n.º 1
0
        //private static RunAt ConvertToOldStyleRunAt(RunAt[] runAt)
        //{
        //    List<RunAt> runAtList = new List<RunAt>(runAt);
        //    if (runAtList.Contains(RunAt.Client) && runAtList.Contains(RunAt.Server))
        //        return RunAt.Both;
        //    else if (runAtList.Contains(RunAt.Client))
        //        return RunAt.Client;
        //    else
        //        return RunAt.Server;
        //}

        public static void AddDataElementNodeAttributes(XmlNode dataElementNode, string name, string defaultDisplayName, System.Type dataType, PropertyDisplayType displayType, bool visible, bool allowOverride, bool readOnly, bool customProperty)
        {
            AddAttribute(dataElementNode, "name", name);
			AddAttribute(dataElementNode, "displayname", defaultDisplayName); // the unique name of the action
            AddAttribute(dataElementNode, "type", PolicyResourceTypes.GetStringFromType(dataType));
            AddAttribute(dataElementNode, "displaytype", displayType.ToString());
            AddAttribute(dataElementNode, "visible", visible.ToString(CultureInfo.InvariantCulture).ToLower(CultureInfo.InvariantCulture));
            AddAttribute(dataElementNode, "override", allowOverride.ToString(CultureInfo.InvariantCulture).ToLower(CultureInfo.InvariantCulture));
            AddAttribute(dataElementNode, "readonly", readOnly.ToString(CultureInfo.InvariantCulture).ToLower(CultureInfo.InvariantCulture));
            AddAttribute(dataElementNode, "customproperty", customProperty.ToString(CultureInfo.InvariantCulture).ToLower(CultureInfo.InvariantCulture));
        }
Exemplo n.º 2
0
		public MockActionProperty(string defaultDisplayName, Type dataType, 
			PropertyDisplayType displayType, object value, bool readOnly)
		{
			m_defaultDisplayName = defaultDisplayName;
			m_dataType = dataType;
			m_displayType = displayType;
			m_visible = true;
			m_override = true;
			Value = value;
            m_readOnly = readOnly;
		}
		public MockResourceActionProperty(string displayName, Type type, object value, PropertyDisplayType displayType, bool readOnly, bool customProperty)
		{
            m_name = displayName;
			m_defaultDisplayName = displayName;
			m_type = type;
			m_displayType = displayType;
			m_visible = true;
			m_override = true;
			m_value = value;
            m_readOnly = readOnly;
            m_customProperty = customProperty;
		}
Exemplo n.º 4
0
 /// <summary>
 /// Populate the ResourceActionProperty with the input parameters
 /// </summary>
 /// <param name="defaultDisplayName"></param>
 /// <param name="dataType"></param>
 /// <param name="displayType"></param>
 /// <param name="allowOverride"></param>
 /// <param name="visible"></param>
 /// <param name="value"></param>
 public void SetActionProperty(
     string name,
     string defaultDisplayName,
     Type dataType,
     PropertyDisplayType displayType,
     bool allowOverride,
     bool visible,
     ISystemProperty systemProperty,
     object value,
     bool readOnly)
 {
     m_name = name;
     m_defaultDisplayName = defaultDisplayName;
     m_dataType = dataType;
     m_propertyDisplayType = displayType;
     m_override = allowOverride;
     m_visible = visible;
     m_systemProperty = systemProperty;
     m_value = value;
     m_readOnly = readOnly;
 }
Exemplo n.º 5
0
 public RouterProperty(string displayName, Type type, PropertyDisplayType displayType)
 {
     m_displayName = displayName;
     m_type = type;
     m_displayType = displayType;
 }
Exemplo n.º 6
0
		private void AddProperty(string key, CleanPropertiesDisplayTranslator displayer, Type dataType, PropertyDisplayType displayType, bool visible, bool allowOverride, object value, bool readOnly)
		{
			string name = (displayer == null ? key : displayer.GetDisplayType(key));
			ActionProperty property = new ActionProperty(name, dataType, displayType, visible, allowOverride, value, readOnly);
			Add(key, property);
		}