Ejemplo n.º 1
0
        // add or change existing included type of change and its respective parametertypes
        protected void AddOrChange(ChangeInitInfo inputInfo)
        {
            //MakeLog("Initializing ChangeType " + inputInfo.ChangeType);

            ChangeInitInfo info;

            if (changeTypeToInfo.TryGetValue(inputInfo.ChangeType, out info))
            {
                MakeLogWarning("Overwriting entry for ChangeType " + inputInfo.ChangeType);
                info.ParameterTypes = inputInfo.ParameterTypes;
            }
            else
            {
                changeTypeToInfo.Add(inputInfo.ChangeType, inputInfo);
            }
        }
Ejemplo n.º 2
0
        public static Change Create(ChangeInitInfo changeInitInfo, List <object> parameters)
        {
            if (changeInitInfo == null)
            {
                MakeLogWarningStatic(typeof(Change),
                                     "Aborting Create because insufficient changeInitInfo was provided!");
                return(null);
            }
            Change change = new Change(changeInitInfo);

            if (!change.SetParameters(parameters))
            {
                MakeLogWarningStatic(typeof(Change),
                                     "Aborting Create because insufficient parameters were provided!");
                return(null);
            }
            return(change);
        }
Ejemplo n.º 3
0
 public static bool TryGetChangeInitInfo(ChangeType changeType, out ChangeInitInfo info)
 {
     return(changeTypeToInfo.TryGetValue(changeType, out info));
 }
Ejemplo n.º 4
0
 protected Change(ChangeInitInfo changeInitInfo)
 {
     this.changeInitInfo = changeInitInfo;
     this.parameters     = new List <object>(changeInitInfo.ParameterTypes.Count);
 }