/// <summary> /// Execution one dialog element /// </summary> /// <typeparam name="TData">Type of the element result</typeparam> /// <returns>Result</returns> public async Task <TData> RunForm <TData>() where TData : new() { var data = new TData(); foreach (var property in data.GetType() .GetProperties()) { var attribute = property.GetCustomAttributes(typeof(DialogElementAssignmentAttribute), false) .OfType <DialogElementAssignmentAttribute>() .FirstOrDefault(); if (attribute != null) { var service = (DialogElementBase)_serviceProvider.GetService(attribute.DialogElementType); service.Initialize(_commandContext, _serviceProvider, DialogContext); property.SetValue(data, await service.InternalRun() .ConfigureAwait(false)); } } return(data); }
public VARIANT_TYPE GetType(int index) { if (mValueObject.Count > index) { TData data = (TData)mValueObject[index]; return(data.GetType()); } return(VARIANT_TYPE.VTYPE_UNKNOWN); }
public NFVector3 Vector3Val(int index) { TData data = GetData(index); if (data != null && data.GetType() == VARIANT_TYPE.VTYPE_VECTOR3) { return(data.Vector3Val()); } return(NFDataList.NULL_VECTOR3); }
public NFGUID ObjectVal(int index) { TData data = GetData(index); if (data != null && data.GetType() == VARIANT_TYPE.VTYPE_OBJECT) { return(data.ObjectVal()); } return(NFDataList.NULL_OBJECT); }
public string StringVal(int index) { TData data = GetData(index); if (data != null && data.GetType() == VARIANT_TYPE.VTYPE_STRING) { return(data.StringVal()); } return(NFDataList.NULL_STRING); }
public double FloatVal(int index) { TData data = GetData(index); if (data != null && data.GetType() == VARIANT_TYPE.VTYPE_FLOAT) { return((double)data.FloatVal()); } return((float)NFDataList.NULL_DOUBLE); }
public Int64 IntVal(int index) { TData data = GetData(index); if (data != null && data.GetType() == VARIANT_TYPE.VTYPE_INT) { return(data.IntVal()); } return(NFDataList.NULL_INT); }
public override double DoubleVal(int index) { TData data = GetData(index); if (data != null && data.GetType() == VARIANT_TYPE.VTYPE_DOUBLE) { return(data.DoubleVal()); } return(NFIDataList.NULL_DOUBLE); }
public override float FloatVal(int index) { TData data = GetData(index); if (data != null && data.GetType() == VARIANT_TYPE.VTYPE_FLOAT) { return((float)data.DoubleVal()); } return((float)NFIDataList.NULL_DOUBLE); }
public bool SetVector3(int index, NFVector3 value) { TData data = GetData(index); if (data != null && data.GetType() == VARIANT_TYPE.VTYPE_VECTOR3) { data.Set(value); return(true); } return(false); }
public bool SetObject(int index, NFGUID value) { TData data = GetData(index); if (data != null && data.GetType() == VARIANT_TYPE.VTYPE_OBJECT) { data.Set(value); return(true); } return(false); }
public bool SetString(int index, string value) { TData data = GetData(index); if (data != null && data.GetType() == VARIANT_TYPE.VTYPE_STRING) { data.Set(value); return(true); } return(false); }
public bool SetFloat(int index, double value) { TData data = GetData(index); if (data != null && data.GetType() == VARIANT_TYPE.VTYPE_FLOAT) { data.Set(value); return(true); } return(false); }
public bool SetInt(int index, Int64 value) { TData data = GetData(index); if (data != null && data.GetType() == VARIANT_TYPE.VTYPE_INT) { data.Set(value); return(true); } return(false); }
public override bool SetDouble(int index, double value) { TData data = GetData(index); if (data != null && data.GetType() == VARIANT_TYPE.VTYPE_DOUBLE) { data.Set(value); return(true); } return(false); }