コード例 #1
0
ファイル: AzLogTest.cs プロジェクト: rlittletht/AzLog
        public void TestAzLogEntryEntityConstructor()
        {
            AzLogEntryEntity azlee = new AzLogEntryEntity();

            azlee.PartitionKey    = "Partition";
            azlee.RowKey          = Guid.Empty.ToString();
            azlee.InstanceId      = "a000";
            azlee.EventTickCount  = 1;
            azlee.EventId         = 2;
            azlee.Level           = "Level";
            azlee.ApplicationName = "AppName";
            azlee.Pid             = 3;
            azlee.Tid             = 4;
            azlee.Message         = "Message";

            AzLogEntry azle = AzLogEntry.Create(azlee);

            Assert.AreEqual("Partition", azle.Partition);
            Assert.AreEqual(Guid.Empty, azle.RowKey);
            Assert.AreEqual(1, azle.EventTickCount);
            Assert.AreEqual("AppName", azle.ApplicationName);
            Assert.AreEqual("Level", azle.Level);
            Assert.AreEqual(2, azle.EventId);
            Assert.AreEqual("0000A000", azle.InstanceId);
            Assert.AreEqual(3, azle.Pid);
            Assert.AreEqual(4, azle.Tid);
            Assert.AreEqual("Message", azle.Message);
        }
コード例 #2
0
ファイル: AzLogTest.cs プロジェクト: rlittletht/AzLog
        public void TestAzLogEntryConstructor()
        {
            AzLogEntry azle = AzLogEntry.Create("Partition", Guid.Empty, 1, "AppName", "Level", 2, "a000", 3, 4,
                                                "Message");

            Assert.AreEqual("Partition", azle.Partition);
            Assert.AreEqual(Guid.Empty, azle.RowKey);
            Assert.AreEqual(1, azle.EventTickCount);
            Assert.AreEqual("AppName", azle.ApplicationName);
            Assert.AreEqual("Level", azle.Level);
            Assert.AreEqual(2, azle.EventId);
            Assert.AreEqual("0000A000", azle.InstanceId);
            Assert.AreEqual(3, azle.Pid);
            Assert.AreEqual(4, azle.Tid);
            Assert.AreEqual("Message", azle.Message);
        }
コード例 #3
0
        public void AddTestDataPartition(DateTime dttmPartition, Int64[] rgTickCount, string [] rgs)
        {
            AzLogEntries azles = new AzLogEntries();

            for (int i = 0; i < rgTickCount.Length; i++)
            {
                Int64  nTickCount = rgTickCount[i];
                string s          = rgs == null ? "msg" : rgs[i];

                AzLogEntry azle = AzLogEntry.Create(dttmPartition.ToString("yyyyMMddHH"), Guid.NewGuid(), nTickCount, "testdata", "Informational",
                                                    1, "2", 3, 4, s);

                m_azles.AddLogEntry(azle);
            }

            azles.UpdatePart(dttmPartition, dttmPartition.AddHours(1), AzLogParts.GrfDatasourceForIDatasource(1), AzLogPartState.Complete);
        }