protected override void OnGetSourceValuePointers(UInt32 taskId, EnumWebValueSources scope, List <ISourceValuePointer> list) { ISourceValuePointer p = this.ActionOwner as ISourceValuePointer; if (p != null) { if (scope == EnumWebValueSources.HasClientValues) { if (p.IsWebClientValue()) { list.Add(p); } } else if (scope == EnumWebValueSources.HasServerValues) { if (p.IsWebServerValue()) { list.Add(p); } } else { list.Add(p); } } }
public bool IsSameProperty(ISourceValuePointer p) { if (_value != null) { return(_value.IsSameProperty(p)); } return(false); }
public bool IsSameProperty(ISourceValuePointer p) { MathNodeMethodPointer mp = p as MathNodeMethodPointer; if (mp != null) { return(mp.ID == this.ID); } return(false); }
public void SetTaskId(UInt32 taskId) { _taskId = taskId; ISourceValuePointer sv = _methodPointer as ISourceValuePointer; if (sv != null) { sv.SetTaskId(taskId); } }
public void SetTaskId(UInt32 taskId) { _taskId = taskId; ISourceValuePointer sp = _valuePointer as ISourceValuePointer; if (sp != null) { sp.SetTaskId(taskId); } }
public bool IsSameProperty(ISourceValuePointer p) { IObjectIdentity objectPointer = p as IObjectIdentity; if (objectPointer != null) { return(IsSameObjectRef(objectPointer)); } return(false); }
public SeverStatePointer(ISourceValuePointer sv, ClassPointer root, EnumWebRunAt runAt) : this(sv.DataPassingCodeName, new DataTypePointer(typeof(string)), root, runAt) { _value = sv; _prop = sv as IProperty; if (_prop != null) { _dataType = new DataTypePointer(_prop.ObjectType); } }
public bool ValueExists(ISourceValuePointer sv) { foreach (KeyValuePair <int, PropertyPointerList> kv in this) { foreach (ISourceValuePointer p in kv.Value) { if (p.IsSameProperty(sv)) { return(true); } } } return(false); }
public void AddServerState(ISourceValuePointer v) { if (_serverStates == null) { _serverStates = new List <ISourceValuePointer>(); } foreach (ISourceValuePointer sv in _serverStates) { if (sv.IsSameProperty(v)) { return; } } _serverStates.Add(v); }
public IList <ISourceValuePointer> GetUploadProperties(UInt32 taskId) { if (_mathExp != null && _mathExp.MathExpression != null && _mathExp.MathExpression.OutputVariable != null) { ISourceValuePointer v = _mathExp.MathExpression.OutputVariable as ISourceValuePointer; if (v != null) { if (v.IsWebServerValue() && !v.IsWebClientValue()) { return(GetClientProperties(taskId)); } } } return(null); }
public bool IsSameProperty(ISourceValuePointer p) { if (_valuePointer != null) { IObjectPointer vp = p as IObjectPointer; if (vp != null) { return(_valuePointer.IsSameObjectRef(vp)); } MathNodePointer mp = p as MathNodePointer; if (mp != null) { return(_valuePointer.IsSameObjectRef(mp._valuePointer)); } } return(false); }
public void SetValueOwner(object o) { ISourceValuePointer sv = _methodPointer as ISourceValuePointer; if (sv != null) { sv.SetValueOwner(o); } if (_methodPointer != null) { if (_methodPointer.Owner == null) { IObjectPointer p = o as IObjectPointer; if (p != null) { } } } }
public bool IsSameProperty(ISourceValuePointer p) { ParameterClass pc = p as ParameterClass; if (pc != null) { return(pc.ParameterID == this.ParameterID); } else { CustomMethodParameterPointer cmp = p as CustomMethodParameterPointer; if (cmp != null) { if (cmp.Parameter != null) { if (cmp.Parameter.ParameterID == this.ParameterID) { return(true); } } } } return(false); }
public IList <ISourceValuePointer> GetServerVariables(ClassPointer root) { Dictionary <UInt32, IAction> actions = root.GetActions(); SourceValuePointerList svs = new SourceValuePointerList(); foreach (TaskID tid in Sect0) //check client action return values { HandlerMethodID hmid = tid as HandlerMethodID; if (hmid != null) { WebClientEventHandlerMethod wceh = hmid.HandlerMethod as WebClientEventHandlerMethod; if (wceh != null) { hmid.HandlerMethod.SetActions(actions); List <IAction> acts = hmid.HandlerMethod.GetActions(); foreach (IAction act in acts) { if (act.ReturnReceiver != null) { ISourceValuePointer sv = act.ReturnReceiver as ISourceValuePointer; if (sv != null && sv.IsWebServerValue() && !sv.IsWebClientValue()) { svs.AddUnique(sv); } } } } } else { IAction a = tid.GetPublicAction(root); if (a != null) { if (a.ReturnReceiver != null) { ISourceValuePointer sv = a.ReturnReceiver as ISourceValuePointer; if (sv != null && sv.IsWebServerValue() && !sv.IsWebClientValue()) { svs.AddUnique(sv); } } } } } foreach (TaskID tid in Sect1) //check server action parameters { HandlerMethodID hmid = tid as HandlerMethodID; if (hmid != null) { WebClientEventHandlerMethod wceh = hmid.HandlerMethod as WebClientEventHandlerMethod; if (wceh != null) { hmid.HandlerMethod.SetActions(actions); hmid.HandlerMethod.CollectSourceValues(tid.TaskId); // svs.AddUnique(hmid.HandlerMethod.DownloadProperties); // List <MethodClass> ml = new List <MethodClass>(); hmid.HandlerMethod.GetCustomMethods(ml); foreach (MethodClass m in ml) { m.CollectSourceValues(tid.TaskId); svs.AddUnique(m.DownloadProperties); } } } else { IAction a = tid.GetPublicAction(root); if (a != null && a.ActionMethod != null && a.ActionMethod.Owner != null) { IFormSubmitter fs = a.ActionMethod.Owner.ObjectInstance as IFormSubmitter; if (fs != null && fs.IsSubmissionMethod(a.ActionMethod.MethodName)) { continue; } svs.AddUnique(a.GetServerProperties(tid.TaskId)); ISourceValuePointer p = a.ReturnReceiver as ISourceValuePointer; if (p != null) { if (p.IsWebServerValue()) { svs.AddUnique(p); } } } } } //collect download (server) variables from client actions foreach (TaskID tid in Sect2) { HandlerMethodID hmid = tid as HandlerMethodID; if (hmid != null) { WebClientEventHandlerMethod wceh = hmid.HandlerMethod as WebClientEventHandlerMethod; if (wceh != null) { hmid.HandlerMethod.SetActions(actions); hmid.HandlerMethod.CollectSourceValues(tid.TaskId); // svs.AddUnique(hmid.HandlerMethod.DownloadProperties); // List <MethodClass> ml = new List <MethodClass>(); hmid.HandlerMethod.GetCustomMethods(ml); foreach (MethodClass m in ml) { m.CollectSourceValues(tid.TaskId); svs.AddUnique(m.DownloadProperties); } } } else { IAction a = tid.GetPublicAction(root); if (a != null) { svs.AddUnique(a.GetServerProperties(tid.TaskId)); } } } return(svs); }