public Field(IFieldType fieldType, Guid? id = null, string name = "") { FieldType = fieldType; Id = id ?? Guid.NewGuid(); Name = name; if (string.IsNullOrWhiteSpace(Name)) { Name = FieldType.Key.ToString(); } }
public FieldDeprecationChanged(IGraphType objectType, IFieldType oldField, IFieldType newField) : base(Criticality.NonBreaking) { this.objectType = objectType; this.oldField = oldField; this.newField = newField; }
public FieldAdded(ObjectGraphType objectType, IFieldType field) : base(Criticality.NonBreaking) { this.field = field; this.objectType = objectType; }
/// <summary> /// Encodes the attribute value from a format that Rock understands to a format for Avalanche. /// Useful for more complex values such as an address. /// </summary> /// <param name="fieldType"></param> /// <param name="attribute"></param> /// <param name="value"></param> /// <returns></returns> public virtual string EncodeValue(IFieldType fieldType, AttributeCache attribute, string value, bool isReadOnly = false) { //Default is to passthrough the value return(value); }
/// <inheritdoc/> public virtual Task <bool> AllowArgument(IFieldType field, QueryArgument argument) => Allowed;
/// <inheritdoc/> public override Task <bool> AllowField(IGraphType parent, IFieldType field) => Allowed;
public new bool HasFieldValue(IFieldType fieldType) { var f = GetField(fieldType); return(f != null && f.HasValue); }
public bool HasFieldValue(IFieldType fieldType) { return(HasField(fieldType) && _fieldsByType[fieldType].HasValue); }
partial void FieldType_SetCondition(ref IFieldDefinition instance, ref IFieldType setValue);
/// <inheritdoc/> public virtual IComparer <QueryArgument>?ArgumentComparer(IFieldType field) => null;
/// <inheritdoc/> public virtual IComparer <QueryArgument> ArgumentComparer(IFieldType field) => _instance3;
public virtual Task <bool> AllowArgument(IFieldType field, QueryArgument argument) { return(Task.FromResult(true)); }
public virtual Task <bool> AllowField(IGraphType parent, IFieldType field) { return(Task.FromResult(true)); }
public PasswordField(IFieldType fieldType, Guid? id = null, string name = "") : base(fieldType, id, name) { }
public static string ToCapitalizedCSharpType(IFieldType fieldType) { string s = ToCSharpType(fieldType); return(s.Substring(0, 1).ToUpper() + s.Substring(1)); }
public PasswordField(IFieldType fieldType, Guid?id = null, string name = "") : base(fieldType, id, name) { }
public bool HasField(IFieldType fieldType) { return(_fieldsByType.ContainsKey(fieldType)); }
public object GetFieldValue(IFieldType fieldType) { return(GetField(fieldType)?.Value); }
public void AddField(Type requestingType, IFieldType fieldType, object fieldValue) { AddField(EditorConfig.CreateField(requestingType, fieldType, fieldValue)); }
public string GetFieldValueAsString(IFieldType fieldType) { return(Convert.ToString(GetFieldValue(fieldType))); }
public DateTimeObjectField(IFieldType fieldType, TElementType element) : base(fieldType, element) { }
public int GetFieldValueAsInt(IFieldType fieldType) { return(Convert.ToInt32(GetFieldValue(fieldType))); }
/// <inheritdoc/> public virtual Task <bool> AllowField(IGraphType parent, IFieldType field) => parent.IsIntrospectionType() && field.Name == "appliedDirectives" ? Forbidden : Allowed;
public decimal GetFieldValueAsDecimal(IFieldType fieldType) { return(Convert.ToDecimal(GetFieldValue(fieldType))); }
public abstract FormElementItem Convert(IFieldType fieldType, AttributeCache attribute);
public double GetFieldValueAsDouble(IFieldType fieldType) { return(Convert.ToDouble(GetFieldValue(fieldType))); }
/// <summary> /// Decodes the attribute value from Avalanche into a format Rock can use. /// Useful for more complex values such as an address. /// </summary> /// <param name="fieldType"></param> /// <param name="attribute"></param> /// <param name="value"></param> /// <returns></returns> public virtual string DecodeValue(IFieldType fieldType, AttributeCache attribute, string value) { //Default is to passthrough the value return(value); }
public float GetFieldValueAsFloat(IFieldType fieldType) { return(Convert.ToSingle(GetFieldValue(fieldType))); }
public InputFieldRemoved(IGraphType objectType, IFieldType field) : base(Criticality.Breaking) { this.objectType = objectType; this.field = field; }
public bool GetFieldValueAsBool(IFieldType fieldType) { return(Convert.ToBoolean(GetFieldValue(fieldType))); }
public Color GetFieldValueAsColor(IFieldType fieldType, Color defaultColor = default) { return((Color)(GetFieldValue(fieldType) ?? defaultColor)); }
public UnitizedObjectEditFieldBase(IFieldType fieldType, TElementType element) : base(fieldType, element) { }