예제 #1
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.TypeInfo).IsAssignableFrom(this.Session["it"].GetType()) == false))
             {
                 this.Error("The type \'org.pescuma.ModelSharp.Core.model.TypeInfo\' of the parameter \'it\' did n" +
                            "ot match the type of the data passed to the template.");
             }
             else
             {
                 this._itField   = ((global::org.pescuma.ModelSharp.Core.model.TypeInfo)(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.TypeInfo).IsAssignableFrom(data.GetType()) == false))
                 {
                     this.Error("The type \'org.pescuma.ModelSharp.Core.model.TypeInfo\' of the parameter \'it\' did n" +
                                "ot match the type of the data passed to the template.");
                 }
                 else
                 {
                     this._itField = ((global::org.pescuma.ModelSharp.Core.model.TypeInfo)(data));
                 }
             }
         }
     }
 }
예제 #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.TypeInfo).IsAssignableFrom(this.Session["it"].GetType()) == false))
    {
        this.Error("The type \'org.pescuma.ModelSharp.Core.model.TypeInfo\' of the parameter \'it\' did n" +
                "ot match the type of the data passed to the template.");
    }
    else
    {
        this._itField = ((global::org.pescuma.ModelSharp.Core.model.TypeInfo)(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.TypeInfo).IsAssignableFrom(data.GetType()) == false))
        {
            this.Error("The type \'org.pescuma.ModelSharp.Core.model.TypeInfo\' of the parameter \'it\' did n" +
                    "ot match the type of the data passed to the template.");
        }
        else
        {
            this._itField = ((global::org.pescuma.ModelSharp.Core.model.TypeInfo)(data));
        }
    }
}
bool classValueAcquired = false;
if (this.Session.ContainsKey("class"))
{
    if ((typeof(string).IsAssignableFrom(this.Session["class"].GetType()) == false))
    {
        this.Error("The type \'System.String\' of the parameter \'class\' did not match the type of the d" +
                "ata passed to the template.");
    }
    else
    {
        this._classField = ((string)(this.Session["class"]));
        classValueAcquired = true;
    }
}
if ((classValueAcquired == false))
{
    object data = global::System.Runtime.Remoting.Messaging.CallContext.LogicalGetData("class");
    if ((data != null))
    {
        if ((typeof(string).IsAssignableFrom(data.GetType()) == false))
        {
            this.Error("The type \'System.String\' of the parameter \'class\' did not match the type of the d" +
                    "ata passed to the template.");
        }
        else
        {
            this._classField = ((string)(data));
        }
    }
}


    }
}