public override void Initialize() { base.Initialize(); if ((this.Errors.HasErrors == false)) { bool itValueAcquired = false; if (this.Session.ContainsKey("it")) { if ((typeof(global::org.pescuma.ModelSharp.Core.model.CollectionInfo).IsAssignableFrom(this.Session["it"].GetType()) == false)) { this.Error("The type \'org.pescuma.ModelSharp.Core.model.CollectionInfo\' of the parameter \'it\'" + " did not match the type of the data passed to the template."); } else { this._itField = ((global::org.pescuma.ModelSharp.Core.model.CollectionInfo)(this.Session["it"])); itValueAcquired = true; } } if ((itValueAcquired == false)) { object data = global::System.Runtime.Remoting.Messaging.CallContext.LogicalGetData("it"); if ((data != null)) { if ((typeof(global::org.pescuma.ModelSharp.Core.model.CollectionInfo).IsAssignableFrom(data.GetType()) == false)) { this.Error("The type \'org.pescuma.ModelSharp.Core.model.CollectionInfo\' of the parameter \'it\'" + " did not match the type of the data passed to the template."); } else { this._itField = ((global::org.pescuma.ModelSharp.Core.model.CollectionInfo)(data)); } } } } }
public override void Initialize() { base.Initialize(); if ((this.Errors.HasErrors == false)) { bool itValueAcquired = false; if (this.Session.ContainsKey("it")) { if ((typeof(global::org.pescuma.ModelSharp.Core.model.CollectionInfo).IsAssignableFrom(this.Session["it"].GetType()) == false)) { this.Error("The type \'org.pescuma.ModelSharp.Core.model.CollectionInfo\' of the parameter \'it\'" + " did not match the type of the data passed to the template."); } else { this._itField = ((global::org.pescuma.ModelSharp.Core.model.CollectionInfo)(this.Session["it"])); itValueAcquired = true; } } if ((itValueAcquired == false)) { object data = global::System.Runtime.Remoting.Messaging.CallContext.LogicalGetData("it"); if ((data != null)) { if ((typeof(global::org.pescuma.ModelSharp.Core.model.CollectionInfo).IsAssignableFrom(data.GetType()) == false)) { this.Error("The type \'org.pescuma.ModelSharp.Core.model.CollectionInfo\' of the parameter \'it\'" + " did not match the type of the data passed to the template."); } else { this._itField = ((global::org.pescuma.ModelSharp.Core.model.CollectionInfo)(data)); } } } bool targetValueAcquired = false; if (this.Session.ContainsKey("target")) { if ((typeof(string).IsAssignableFrom(this.Session["target"].GetType()) == false)) { this.Error("The type \'System.String\' of the parameter \'target\' did not match the type of the " + "data passed to the template."); } else { this._targetField = ((string)(this.Session["target"])); targetValueAcquired = true; } } if ((targetValueAcquired == false)) { object data = global::System.Runtime.Remoting.Messaging.CallContext.LogicalGetData("target"); if ((data != null)) { if ((typeof(string).IsAssignableFrom(data.GetType()) == false)) { this.Error("The type \'System.String\' of the parameter \'target\' did not match the type of the " + "data passed to the template."); } else { this._targetField = ((string)(data)); } } } } }