public override void BeforeSetProperties(IBeforeSetPropertiesCallInfo info)
        {
            var res = this.BeforeSetPropertiesPreCheck(info);

            if (!string.IsNullOrEmpty(res))
            {
                info.Fail(res);
                return;
            }

            try
            {
                base.BeforeSetProperties(info);
            }
            catch (Exception e)
            {
                this.PluginHost.BroadcastErrorInfoEvent(e.ToString(), info);
                return;
            }

            res = this.BeforeSetPropertiesPostCheck(info);
            if (!string.IsNullOrEmpty(res))
            {
                this.PluginHost.BroadcastErrorInfoEvent(res, info);
            }
        }
Ejemplo n.º 2
0
        public override void BeforeSetProperties(IBeforeSetPropertiesCallInfo info)
        {
            ++this.CallsCount;

            try
            {
                this.CheckIBeforeSetPropertiesCallInfo(info);
                this.CheckBeforeBeforeSetProperties();
            }
            catch (Exception e)
            {
                info.Fail(e.ToString());
                return;
            }

            try
            {
                base.BeforeSetProperties(info);
                this.CheckAfterBeforeSetProperties();
            }
            catch (Exception e)
            {
                this.PluginHost.BroadcastErrorInfoEvent(e.ToString(), info);
            }
        }
 public override void BeforeSetProperties(IBeforeSetPropertiesCallInfo info)
 {
     if (info.Request.ActorNumber == 0)
     {
         base.BeforeSetProperties(info);
     }
     else if (info.Request.ActorNumber == 1)
     {
         info.Cancel();
     }
     else if (info.Request.ActorNumber == 2)
     {
         info.Defer();
     }
     else if (info.Request.ActorNumber == 3)
     {
         info.Fail();
         this.PluginHost.BroadcastErrorInfoEvent("We called fail method");
     }
 }
Ejemplo n.º 4
0
 public override void BeforeSetProperties(IBeforeSetPropertiesCallInfo info)
 {
     if (info.Request.ActorNumber == 0)
     {
         base.BeforeSetProperties(info);
     }
     else if (info.Request.ActorNumber == 1)
     {
         info.Cancel();
     }
     else if (info.Request.ActorNumber == 2)
     {
         info.Defer();
     }
     else if (info.Request.ActorNumber == 3)
     {
         info.Fail();
         this.PluginHost.BroadcastErrorInfoEvent("We called fail method");
     }
 }
        public override void BeforeSetProperties(IBeforeSetPropertiesCallInfo info)
        {
            if (info.Request.ActorNumber == 0)
            {
                base.BeforeSetProperties(info);
            }
            else if (info.Request.ActorNumber == 1)
            {
                info.Cancel();
            }
            else if (info.Request.ActorNumber == 2)
            {
#pragma warning disable CS0618 // Type or member is obsolete
                info.Defer();
#pragma warning restore CS0618 // Type or member is obsolete
            }
            else if (info.Request.ActorNumber == 3)
            {
                info.Fail();
                this.PluginHost.BroadcastErrorInfoEvent("We called fail method");
            }
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Calls info.Fail
 /// </summary>
 /// <param name="info"></param>
 public void BeforeSetProperties(IBeforeSetPropertiesCallInfo info)
 {
     info.Fail(this.errorMsg);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Calls info.Fail
 /// </summary>
 /// <param name="info"></param>
 public void BeforeSetProperties(IBeforeSetPropertiesCallInfo info)
 {
     info.Fail(this.errorMsg);
 }