Exemplo n.º 1
0
 public override string ToString()
 {
     return(String.Join("", new string[] {
         "", "No.", SerialNumber.ToString(),
         " ", "EPC:", EPC,
         " ", "ant:", Antenna.ToString(),
         " ", "rssi:", RSSI.ToString(),
         " ", "count:", ReadCount.ToString(),
         " ", "time:", TimeStamp.ToString("yyyy-MM-dd'T'HH:mm:ss.fffK"),
     }));
 }
Exemplo n.º 2
0
 protected override void AfterInit()
 {
     AverageTimer.Reset();
     CreateCount.Reset();
     ReadCount.Reset();
     DeleteCount.Reset();
     UpdateCount.Reset();
     IncomePerSec.Reset();
     AllProcessPerSec.Reset();
     AsyncProcessPerSec.Reset();
     SyncProcessPerSec.Reset();
     CustomOperationCount.Reset();
 }
Exemplo n.º 3
0
    public override int GetHashCode()
    {
        int hashcode = 157;

        unchecked {
            if (__isset._from)
            {
                hashcode = (hashcode * 397) + _from.GetHashCode();
            }
            if (__isset.to)
            {
                hashcode = (hashcode * 397) + To.GetHashCode();
            }
            if (__isset.toType)
            {
                hashcode = (hashcode * 397) + ToType.GetHashCode();
            }
            if (__isset.id)
            {
                hashcode = (hashcode * 397) + Id.GetHashCode();
            }
            if (__isset.createdTime)
            {
                hashcode = (hashcode * 397) + CreatedTime.GetHashCode();
            }
            if (__isset.deliveredTime)
            {
                hashcode = (hashcode * 397) + DeliveredTime.GetHashCode();
            }
            if (__isset.text)
            {
                hashcode = (hashcode * 397) + Text.GetHashCode();
            }
            if (__isset.location)
            {
                hashcode = (hashcode * 397) + Location.GetHashCode();
            }
            if (__isset.hasContent)
            {
                hashcode = (hashcode * 397) + HasContent.GetHashCode();
            }
            if (__isset.contentType)
            {
                hashcode = (hashcode * 397) + ContentType.GetHashCode();
            }
            if (__isset.contentPreview)
            {
                hashcode = (hashcode * 397) + ContentPreview.GetHashCode();
            }
            if (__isset.contentMetadata)
            {
                hashcode = (hashcode * 397) + TCollections.GetHashCode(ContentMetadata);
            }
            if (__isset.sessionId)
            {
                hashcode = (hashcode * 397) + SessionId.GetHashCode();
            }
            if (__isset.chunks)
            {
                hashcode = (hashcode * 397) + TCollections.GetHashCode(Chunks);
            }
            if (__isset.relatedMessageId)
            {
                hashcode = (hashcode * 397) + RelatedMessageId.GetHashCode();
            }
            if (__isset.messageRelationType)
            {
                hashcode = (hashcode * 397) + MessageRelationType.GetHashCode();
            }
            if (__isset.readCount)
            {
                hashcode = (hashcode * 397) + ReadCount.GetHashCode();
            }
            if (__isset.relatedMessageServiceCode)
            {
                hashcode = (hashcode * 397) + RelatedMessageServiceCode.GetHashCode();
            }
        }
        return(hashcode);
    }
        // Module defining this command


        // Optional custom code for this activity


        /// <summary>
        /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
        /// </summary>
        /// <param name="context">The NativeActivityContext for the currently running activity.</param>
        /// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
        /// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
        protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
        {
            System.Management.Automation.PowerShell invoker       = global::System.Management.Automation.PowerShell.Create();
            System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);

            // Initialize the arguments

            if (ReadCount.Expression != null)
            {
                targetCommand.AddParameter("ReadCount", ReadCount.Get(context));
            }

            if (TotalCount.Expression != null)
            {
                targetCommand.AddParameter("TotalCount", TotalCount.Get(context));
            }

            if (Tail.Expression != null)
            {
                targetCommand.AddParameter("Tail", Tail.Get(context));
            }

            if (Path.Expression != null)
            {
                targetCommand.AddParameter("Path", Path.Get(context));
            }

            if (LiteralPath.Expression != null)
            {
                targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
            }

            if (Filter.Expression != null)
            {
                targetCommand.AddParameter("Filter", Filter.Get(context));
            }

            if (Include.Expression != null)
            {
                targetCommand.AddParameter("Include", Include.Get(context));
            }

            if (Exclude.Expression != null)
            {
                targetCommand.AddParameter("Exclude", Exclude.Get(context));
            }

            if (Force.Expression != null)
            {
                targetCommand.AddParameter("Force", Force.Get(context));
            }

            if (Credential.Expression != null)
            {
                targetCommand.AddParameter("Credential", Credential.Get(context));
            }

            if (Delimiter.Expression != null)
            {
                targetCommand.AddParameter("Delimiter", Delimiter.Get(context));
            }

            if (Wait.Expression != null)
            {
                targetCommand.AddParameter("Wait", Wait.Get(context));
            }

            if (Raw.Expression != null)
            {
                targetCommand.AddParameter("Raw", Raw.Get(context));
            }

            if (Encoding.Expression != null)
            {
                targetCommand.AddParameter("Encoding", Encoding.Get(context));
            }

            if (Stream.Expression != null)
            {
                targetCommand.AddParameter("Stream", Stream.Get(context));
            }


            return(new ActivityImplementationContext()
            {
                PowerShellInstance = invoker
            });
        }
Exemplo n.º 5
0
    public override string ToString()
    {
        var  sb      = new StringBuilder("Message(");
        bool __first = true;

        if (_from != null && __isset._from)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("_from: ");
            _from.ToString(sb);
        }
        if (To != null && __isset.to)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("To: ");
            To.ToString(sb);
        }
        if (__isset.toType)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("ToType: ");
            ToType.ToString(sb);
        }
        if (Id != null && __isset.id)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Id: ");
            Id.ToString(sb);
        }
        if (__isset.createdTime)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("CreatedTime: ");
            CreatedTime.ToString(sb);
        }
        if (__isset.deliveredTime)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("DeliveredTime: ");
            DeliveredTime.ToString(sb);
        }
        if (Text != null && __isset.text)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Text: ");
            Text.ToString(sb);
        }
        if (Location != null && __isset.location)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Location: ");
            Location.ToString(sb);
        }
        if (__isset.hasContent)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("HasContent: ");
            HasContent.ToString(sb);
        }
        if (__isset.contentType)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("ContentType: ");
            ContentType.ToString(sb);
        }
        if (ContentPreview != null && __isset.contentPreview)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("ContentPreview: ");
            ContentPreview.ToString(sb);
        }
        if (ContentMetadata != null && __isset.contentMetadata)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("ContentMetadata: ");
            ContentMetadata.ToString(sb);
        }
        if (__isset.sessionId)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("SessionId: ");
            SessionId.ToString(sb);
        }
        if (Chunks != null && __isset.chunks)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Chunks: ");
            Chunks.ToString(sb);
        }
        if (RelatedMessageId != null && __isset.relatedMessageId)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("RelatedMessageId: ");
            RelatedMessageId.ToString(sb);
        }
        if (__isset.messageRelationType)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("MessageRelationType: ");
            MessageRelationType.ToString(sb);
        }
        if (__isset.readCount)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("ReadCount: ");
            ReadCount.ToString(sb);
        }
        if (__isset.relatedMessageServiceCode)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("RelatedMessageServiceCode: ");
            RelatedMessageServiceCode.ToString(sb);
        }
        sb.Append(")");
        return(sb.ToString());
    }