Esempio n. 1
0
 /// <summary>
 ///
 /// </summary>
 protected override void ProcessRecord()
 {
     if (MyInvocation.BoundParameters.ContainsKey("Path"))
     {
         WriteObject(Sid.Get(hivePath));
     }
     else
     {
         WriteObject(Sid.Get());
     }
 }
        /// <summary>
        ///
        /// </summary>
        protected override void ProcessRecord()
        {
            switch (ParameterSetName)
            {
            case "ByVolume":
                WriteObject(Sid.Get(volume), true);
                break;

            case "ByPath":
                WriteObject(Sid.GetByPath(hivePath), true);
                break;
            }
        }
Esempio n. 3
0
        protected override void Execute(NativeActivityContext context)
        {
            try
            {
                Init(context);

                var messageResource = MessageResource.Fetch(Sid.Get(context));

                Sucess.Set(context, true);
                DateCreated.Set(context, messageResource.DateCreated);
                DateSent.Set(context, messageResource.DateSent);
                Direction.Set(context, messageResource.Direction.ToString());
                From.Set(context, messageResource.From);
                Status.Set(context, messageResource.Status.ToString());
                To.Set(context, messageResource.To);
                Body.Set(context, messageResource.Body);
            }
            catch (Exception ex)
            {
                Sucess.Set(context, value: false);
                ErrorMessage.Set(context, ex.Message);
            }
        }