Esempio n. 1
0
 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();
     }
 }
Esempio n. 2
0
 public FieldDeprecationChanged(IGraphType objectType, IFieldType oldField, IFieldType newField) : base(Criticality.NonBreaking)
 {
     this.objectType = objectType;
     this.oldField   = oldField;
     this.newField   = newField;
 }
Esempio n. 3
0
 public FieldAdded(ObjectGraphType objectType, IFieldType field) : base(Criticality.NonBreaking)
 {
     this.field      = field;
     this.objectType = objectType;
 }
Esempio n. 4
0
 /// <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);
 }
Esempio n. 5
0
 /// <inheritdoc/>
 public virtual Task <bool> AllowArgument(IFieldType field, QueryArgument argument) => Allowed;
Esempio n. 6
0
 /// <inheritdoc/>
 public override Task <bool> AllowField(IGraphType parent, IFieldType field) => Allowed;
Esempio n. 7
0
        public new bool HasFieldValue(IFieldType fieldType)
        {
            var f = GetField(fieldType);

            return(f != null && f.HasValue);
        }
Esempio n. 8
0
 public bool HasFieldValue(IFieldType fieldType)
 {
     return(HasField(fieldType) && _fieldsByType[fieldType].HasValue);
 }
Esempio n. 9
0
 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;
Esempio n. 12
0
 public virtual Task <bool> AllowArgument(IFieldType field, QueryArgument argument)
 {
     return(Task.FromResult(true));
 }
Esempio n. 13
0
 public virtual Task <bool> AllowField(IGraphType parent, IFieldType field)
 {
     return(Task.FromResult(true));
 }
Esempio n. 14
0
 public PasswordField(IFieldType fieldType, Guid? id = null, string name = "")
     : base(fieldType, id, name)
 {
 }
Esempio n. 15
0
        public static string ToCapitalizedCSharpType(IFieldType fieldType)
        {
            string s = ToCSharpType(fieldType);

            return(s.Substring(0, 1).ToUpper() + s.Substring(1));
        }
Esempio n. 16
0
 public PasswordField(IFieldType fieldType, Guid?id = null, string name = "")
     : base(fieldType, id, name)
 {
 }
Esempio n. 17
0
 public bool HasField(IFieldType fieldType)
 {
     return(_fieldsByType.ContainsKey(fieldType));
 }
Esempio n. 18
0
 public object GetFieldValue(IFieldType fieldType)
 {
     return(GetField(fieldType)?.Value);
 }
Esempio n. 19
0
 public void AddField(Type requestingType, IFieldType fieldType, object fieldValue)
 {
     AddField(EditorConfig.CreateField(requestingType, fieldType, fieldValue));
 }
Esempio n. 20
0
 public string GetFieldValueAsString(IFieldType fieldType)
 {
     return(Convert.ToString(GetFieldValue(fieldType)));
 }
Esempio n. 21
0
 public DateTimeObjectField(IFieldType fieldType, TElementType element)
     : base(fieldType, element)
 {
 }
Esempio n. 22
0
 public int GetFieldValueAsInt(IFieldType fieldType)
 {
     return(Convert.ToInt32(GetFieldValue(fieldType)));
 }
Esempio n. 23
0
 /// <inheritdoc/>
 public virtual Task <bool> AllowField(IGraphType parent, IFieldType field) => parent.IsIntrospectionType() && field.Name == "appliedDirectives" ? Forbidden : Allowed;
Esempio n. 24
0
 public decimal GetFieldValueAsDecimal(IFieldType fieldType)
 {
     return(Convert.ToDecimal(GetFieldValue(fieldType)));
 }
Esempio n. 25
0
 public abstract FormElementItem Convert(IFieldType fieldType, AttributeCache attribute);
Esempio n. 26
0
 public double GetFieldValueAsDouble(IFieldType fieldType)
 {
     return(Convert.ToDouble(GetFieldValue(fieldType)));
 }
Esempio n. 27
0
 /// <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);
 }
Esempio n. 28
0
 public float GetFieldValueAsFloat(IFieldType fieldType)
 {
     return(Convert.ToSingle(GetFieldValue(fieldType)));
 }
Esempio n. 29
0
 public InputFieldRemoved(IGraphType objectType, IFieldType field) : base(Criticality.Breaking)
 {
     this.objectType = objectType;
     this.field      = field;
 }
Esempio n. 30
0
 public bool GetFieldValueAsBool(IFieldType fieldType)
 {
     return(Convert.ToBoolean(GetFieldValue(fieldType)));
 }
Esempio n. 31
0
 public Color GetFieldValueAsColor(IFieldType fieldType, Color defaultColor = default)
 {
     return((Color)(GetFieldValue(fieldType) ?? defaultColor));
 }
 public UnitizedObjectEditFieldBase(IFieldType fieldType, TElementType element)
     : base(fieldType, element)
 {
 }