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.ComputedPropertyInfo).IsAssignableFrom(this.Session["it"].GetType()) == false))
    {
        this.Error("The type \'org.pescuma.ModelSharp.Core.model.ComputedPropertyInfo\' of the paramete" +
                "r \'it\' did not match the type of the data passed to the template.");
    }
    else
    {
        this._itField = ((global::org.pescuma.ModelSharp.Core.model.ComputedPropertyInfo)(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.ComputedPropertyInfo).IsAssignableFrom(data.GetType()) == false))
        {
            this.Error("The type \'org.pescuma.ModelSharp.Core.model.ComputedPropertyInfo\' of the paramete" +
                    "r \'it\' did not match the type of the data passed to the template.");
        }
        else
        {
            this._itField = ((global::org.pescuma.ModelSharp.Core.model.ComputedPropertyInfo)(data));
        }
    }
}
bool indexValueAcquired = false;
if (this.Session.ContainsKey("index"))
{
    if ((typeof(int).IsAssignableFrom(this.Session["index"].GetType()) == false))
    {
        this.Error("The type \'System.Int32\' of the parameter \'index\' did not match the type of the da" +
                "ta passed to the template.");
    }
    else
    {
        this._indexField = ((int)(this.Session["index"]));
        indexValueAcquired = true;
    }
}
if ((indexValueAcquired == false))
{
    object data = global::System.Runtime.Remoting.Messaging.CallContext.LogicalGetData("index");
    if ((data != null))
    {
        if ((typeof(int).IsAssignableFrom(data.GetType()) == false))
        {
            this.Error("The type \'System.Int32\' of the parameter \'index\' did not match the type of the da" +
                    "ta passed to the template.");
        }
        else
        {
            this._indexField = ((int)(data));
        }
    }
}


    }
}
Exemplo n.º 2
0
 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.ComputedPropertyInfo).IsAssignableFrom(this.Session["it"].GetType()) == false))
             {
                 this.Error("The type \'org.pescuma.ModelSharp.Core.model.ComputedPropertyInfo\' of the paramete" +
                            "r \'it\' did not match the type of the data passed to the template.");
             }
             else
             {
                 this._itField   = ((global::org.pescuma.ModelSharp.Core.model.ComputedPropertyInfo)(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.ComputedPropertyInfo).IsAssignableFrom(data.GetType()) == false))
                 {
                     this.Error("The type \'org.pescuma.ModelSharp.Core.model.ComputedPropertyInfo\' of the paramete" +
                                "r \'it\' did not match the type of the data passed to the template.");
                 }
                 else
                 {
                     this._itField = ((global::org.pescuma.ModelSharp.Core.model.ComputedPropertyInfo)(data));
                 }
             }
         }
         bool indexValueAcquired = false;
         if (this.Session.ContainsKey("index"))
         {
             if ((typeof(int).IsAssignableFrom(this.Session["index"].GetType()) == false))
             {
                 this.Error("The type \'System.Int32\' of the parameter \'index\' did not match the type of the da" +
                            "ta passed to the template.");
             }
             else
             {
                 this._indexField   = ((int)(this.Session["index"]));
                 indexValueAcquired = true;
             }
         }
         if ((indexValueAcquired == false))
         {
             object data = global::System.Runtime.Remoting.Messaging.CallContext.LogicalGetData("index");
             if ((data != null))
             {
                 if ((typeof(int).IsAssignableFrom(data.GetType()) == false))
                 {
                     this.Error("The type \'System.Int32\' of the parameter \'index\' did not match the type of the da" +
                                "ta passed to the template.");
                 }
                 else
                 {
                     this._indexField = ((int)(data));
                 }
             }
         }
     }
 }