Skip to content

Commit

Permalink
add nservicebus sample
Browse files Browse the repository at this point in the history
  • Loading branch information
S.monzavi authored and S.monzavi committed Apr 9, 2023
1 parent 2523172 commit a55aca6
Show file tree
Hide file tree
Showing 444 changed files with 80,295 additions and 38 deletions.
Binary file not shown.
39 changes: 39 additions & 0 deletions .db/-1701537121.jwj%2f5GmhcuYrVaJYvCSk3w%3d%3d.nodebug.dll.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using Raven.Abstractions;
using Raven.Database.Linq;
using System.Linq;
using System.Collections.Generic;
using System.Collections;
using System;
using Raven.Database.Linq.PrivateExtensions;
using Lucene.Net.Documents;
using System.Globalization;
using System.Text.RegularExpressions;
using Raven.Database.Indexing;

public class Index_FailedErrorImportIndex : Raven.Database.Linq.AbstractViewGenerator
{
public Index_FailedErrorImportIndex()
{
this.ViewText = @"from cc in docs.FailedErrorImports
select new {
Id = cc.__document_id,
Message = cc.Message
}";
this.ForEntityNames.Add("FailedErrorImports");
this.AddMapDefinition(docs =>
from cc in ((IEnumerable<dynamic>)docs)
where string.Equals(cc["@metadata"]["Raven-Entity-Name"], "FailedErrorImports", System.StringComparison.InvariantCultureIgnoreCase)
select new {
Id = cc.__document_id,
Message = cc.Message,
__document_id = cc.__document_id
});
this.AddField("Id");
this.AddField("Message");
this.AddField("__document_id");
this.AddQueryParameterForMap("__document_id");
this.AddQueryParameterForMap("Message");
this.AddQueryParameterForReduce("__document_id");
this.AddQueryParameterForReduce("Message");
}
}
Binary file not shown.
108 changes: 108 additions & 0 deletions .db/-1740072893.nVhbU8xnYZc66w57uTQ6vg%3d%3d.nodebug.dll.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
using Raven.Abstractions;
using Raven.Database.Linq;
using System.Linq;
using System.Collections.Generic;
using System.Collections;
using System;
using Raven.Database.Linq.PrivateExtensions;
using Lucene.Net.Documents;
using System.Globalization;
using System.Text.RegularExpressions;
using Raven.Database.Indexing;

public class Index_RetryBatches_ByStatus_ReduceInitialBatchSize : Raven.Database.Linq.AbstractViewGenerator
{
public Index_RetryBatches_ByStatus_ReduceInitialBatchSize()
{
this.ViewText = @"from doc in docs.RetryBatches
select new {
RequestId = doc.RequestId,
RetryType = doc.RetryType,
HasStagingBatches = doc.Status == 2,
HasForwardingBatches = doc.Status == 3,
InitialBatchSize = doc.InitialBatchSize,
Originator = doc.Originator,
Classifier = doc.Classifier,
StartTime = doc.StartTime,
Last = doc.Last
}
from result in results
group result by new {
RequestId = result.RequestId,
RetryType = result.RetryType
} into g
select new {
RequestId = g.Key.RequestId,
RetryType = g.Key.RetryType,
Originator = (DynamicEnumerable.FirstOrDefault(g)).Originator,
HasStagingBatches = Enumerable.Any(g, x => x.HasStagingBatches),
HasForwardingBatches = Enumerable.Any(g, x0 => x0.HasForwardingBatches),
InitialBatchSize = Enumerable.Sum(g, x1 => ((int)x1.InitialBatchSize)),
StartTime = (DynamicEnumerable.FirstOrDefault(g)).StartTime,
Last = DynamicEnumerable.Max(g, x2 => ((DateTime)x2.Last)),
Classifier = (DynamicEnumerable.FirstOrDefault(g)).Classifier
}";
this.ForEntityNames.Add("RetryBatches");
this.AddMapDefinition(docs =>
from doc in ((IEnumerable<dynamic>)docs)
where string.Equals(doc["@metadata"]["Raven-Entity-Name"], "RetryBatches", System.StringComparison.InvariantCultureIgnoreCase)
select new {
RequestId = doc.RequestId,
RetryType = doc.RetryType,
HasStagingBatches = doc.Status == 2,
HasForwardingBatches = doc.Status == 3,
InitialBatchSize = doc.InitialBatchSize,
Originator = doc.Originator,
Classifier = doc.Classifier,
StartTime = doc.StartTime,
Last = doc.Last,
__document_id = doc.__document_id
});
this.ReduceDefinition = results =>
from result in results
group result by new {
RequestId = result.RequestId,
RetryType = result.RetryType
} into g
select new {
RequestId = g.Key.RequestId,
RetryType = g.Key.RetryType,
Originator = (DynamicEnumerable.FirstOrDefault(g)).Originator,
HasStagingBatches = Enumerable.Any(g, (Func<dynamic, bool>)(x => x.HasStagingBatches)),
HasForwardingBatches = Enumerable.Any(g, (Func<dynamic, bool>)(x0 => x0.HasForwardingBatches)),
InitialBatchSize = Enumerable.Sum(g, (Func<dynamic, int>)(x1 => ((int)x1.InitialBatchSize))),
StartTime = (DynamicEnumerable.FirstOrDefault(g)).StartTime,
Last = DynamicEnumerable.Max(g, (Func<dynamic, DateTime>)(x2 => ((DateTime)x2.Last))),
Classifier = (DynamicEnumerable.FirstOrDefault(g)).Classifier
};
this.GroupByExtraction = result => new {
RequestId = result.RequestId,
RetryType = result.RetryType
};
this.AddField("RequestId");
this.AddField("RetryType");
this.AddField("Originator");
this.AddField("HasStagingBatches");
this.AddField("HasForwardingBatches");
this.AddField("InitialBatchSize");
this.AddField("StartTime");
this.AddField("Last");
this.AddField("Classifier");
this.AddQueryParameterForMap("RequestId");
this.AddQueryParameterForMap("RetryType");
this.AddQueryParameterForMap("InitialBatchSize");
this.AddQueryParameterForMap("Originator");
this.AddQueryParameterForMap("Classifier");
this.AddQueryParameterForMap("StartTime");
this.AddQueryParameterForMap("Last");
this.AddQueryParameterForMap("__document_id");
this.AddQueryParameterForReduce("RequestId");
this.AddQueryParameterForReduce("RetryType");
this.AddQueryParameterForReduce("InitialBatchSize");
this.AddQueryParameterForReduce("Originator");
this.AddQueryParameterForReduce("Classifier");
this.AddQueryParameterForReduce("StartTime");
this.AddQueryParameterForReduce("Last");
this.AddQueryParameterForReduce("__document_id");
}
}
Binary file not shown.
36 changes: 36 additions & 0 deletions .db/-185010957.G4SotISdp2ZSMmWvNLVvFw%3d%3d.nodebug.dll.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using Raven.Abstractions;
using Raven.Database.Linq;
using System.Linq;
using System.Collections.Generic;
using System.Collections;
using System;
using Raven.Database.Linq.PrivateExtensions;
using Lucene.Net.Documents;
using System.Globalization;
using System.Text.RegularExpressions;
using Raven.Database.Indexing;

public class Index_ExpiryProcessedMessageIndex : Raven.Database.Linq.AbstractViewGenerator
{
public Index_ExpiryProcessedMessageIndex()
{
this.ViewText = @"from message in docs.ProcessedMessages
select new {
ProcessedAt = message.ProcessedAt.Ticks
}";
this.ForEntityNames.Add("ProcessedMessages");
this.AddMapDefinition(docs =>
from message in ((IEnumerable<dynamic>)docs)
where string.Equals(message["@metadata"]["Raven-Entity-Name"], "ProcessedMessages", System.StringComparison.InvariantCultureIgnoreCase)
select new {
ProcessedAt = message.ProcessedAt.Ticks,
__document_id = message.__document_id
});
this.AddField("ProcessedAt");
this.AddField("__document_id");
this.AddQueryParameterForMap("ProcessedAt.Ticks");
this.AddQueryParameterForMap("__document_id");
this.AddQueryParameterForReduce("ProcessedAt.Ticks");
this.AddQueryParameterForReduce("__document_id");
}
}
Binary file not shown.
36 changes: 36 additions & 0 deletions .db/-1863937811.Vb7ynz1EueuxlaSqJxKYRA%3d%3d.nodebug.dll.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using Raven.Abstractions;
using Raven.Database.Linq;
using System.Linq;
using System.Collections.Generic;
using System.Collections;
using System;
using Raven.Database.Linq.PrivateExtensions;
using Lucene.Net.Documents;
using System.Globalization;
using System.Text.RegularExpressions;
using Raven.Database.Indexing;

public class Index_Auto_EventLogItems_ByRaisedAtSortByRaisedAt : Raven.Database.Linq.AbstractViewGenerator
{
public Index_Auto_EventLogItems_ByRaisedAtSortByRaisedAt()
{
this.ViewText = @"from doc in docs.EventLogItems
select new {
RaisedAt = doc.RaisedAt
}";
this.ForEntityNames.Add("EventLogItems");
this.AddMapDefinition(docs =>
from doc in ((IEnumerable<dynamic>)docs)
where string.Equals(doc["@metadata"]["Raven-Entity-Name"], "EventLogItems", System.StringComparison.InvariantCultureIgnoreCase)
select new {
RaisedAt = doc.RaisedAt,
__document_id = doc.__document_id
});
this.AddField("RaisedAt");
this.AddField("__document_id");
this.AddQueryParameterForMap("RaisedAt");
this.AddQueryParameterForMap("__document_id");
this.AddQueryParameterForReduce("RaisedAt");
this.AddQueryParameterForReduce("__document_id");
}
}
Binary file not shown.
39 changes: 39 additions & 0 deletions .db/-1994028754.YK1Q5qGM%2b4YDnJqAuxtmfA%3d%3d.nodebug.dll.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using Raven.Abstractions;
using Raven.Database.Linq;
using System.Linq;
using System.Collections.Generic;
using System.Collections;
using System;
using Raven.Database.Linq.PrivateExtensions;
using Lucene.Net.Documents;
using System.Globalization;
using System.Text.RegularExpressions;
using Raven.Database.Indexing;

public class Index_FailedAuditImportIndex : Raven.Database.Linq.AbstractViewGenerator
{
public Index_FailedAuditImportIndex()
{
this.ViewText = @"from cc in docs.FailedAuditImports
select new {
Id = cc.__document_id,
Message = cc.Message
}";
this.ForEntityNames.Add("FailedAuditImports");
this.AddMapDefinition(docs =>
from cc in ((IEnumerable<dynamic>)docs)
where string.Equals(cc["@metadata"]["Raven-Entity-Name"], "FailedAuditImports", System.StringComparison.InvariantCultureIgnoreCase)
select new {
Id = cc.__document_id,
Message = cc.Message,
__document_id = cc.__document_id
});
this.AddField("Id");
this.AddField("Message");
this.AddField("__document_id");
this.AddQueryParameterForMap("__document_id");
this.AddQueryParameterForMap("Message");
this.AddQueryParameterForReduce("__document_id");
this.AddQueryParameterForReduce("Message");
}
}
Binary file not shown.
36 changes: 36 additions & 0 deletions .db/-2013755405.KWpfEn0JemAEgtGCmPbOnQ%3d%3d.nodebug.dll.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using Raven.Abstractions;
using Raven.Database.Linq;
using System.Linq;
using System.Collections.Generic;
using System.Collections;
using System;
using Raven.Database.Linq.PrivateExtensions;
using Lucene.Net.Documents;
using System.Globalization;
using System.Text.RegularExpressions;
using Raven.Database.Indexing;

public class Index_ExpiryEventLogItemsIndex : Raven.Database.Linq.AbstractViewGenerator
{
public Index_ExpiryEventLogItemsIndex()
{
this.ViewText = @"from message in docs.EventLogItems
select new {
LastModified = (message[""@metadata""].Value<DateTime>(""Last-Modified"")).Ticks
}";
this.ForEntityNames.Add("EventLogItems");
this.AddMapDefinition(docs =>
from message in ((IEnumerable<dynamic>)docs)
where string.Equals(message["@metadata"]["Raven-Entity-Name"], "EventLogItems", System.StringComparison.InvariantCultureIgnoreCase)
select new {
LastModified = (message["@metadata"].Value<DateTime>("Last-Modified")).Ticks,
__document_id = message.__document_id
});
this.AddField("LastModified");
this.AddField("__document_id");
this.AddQueryParameterForMap("Ticks");
this.AddQueryParameterForMap("__document_id");
this.AddQueryParameterForReduce("Ticks");
this.AddQueryParameterForReduce("__document_id");
}
}
Binary file not shown.
61 changes: 61 additions & 0 deletions .db/-2017622090.frUJ4Xf03tICdmPcesh%2f8A%3d%3d.nodebug.dll.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
using Raven.Abstractions;
using Raven.Database.Linq;
using System.Linq;
using System.Collections.Generic;
using System.Collections;
using System;
using Raven.Database.Linq.PrivateExtensions;
using Lucene.Net.Documents;
using System.Globalization;
using System.Text.RegularExpressions;
using Raven.Database.Indexing;

public class Index_QueueAddressIndex : Raven.Database.Linq.AbstractViewGenerator
{
public Index_QueueAddressIndex()
{
this.ViewText = @"from message in docs.FailedMessages
select new {
message = message,
processingAttemptsLast = DynamicEnumerable.LastOrDefault(message.ProcessingAttempts)
} into this0
select new {
PhysicalAddress = this0.processingAttemptsLast.FailureDetails.AddressOfFailingEndpoint,
FailedMessageCount = 1
}
from result in results
group result by result.PhysicalAddress into g
select new {
PhysicalAddress = g.Key,
FailedMessageCount = Enumerable.Sum(g, m => ((int)m.FailedMessageCount))
}";
this.ForEntityNames.Add("FailedMessages");
this.AddMapDefinition(docs =>
from message in ((IEnumerable<dynamic>)docs)
where string.Equals(message["@metadata"]["Raven-Entity-Name"], "FailedMessages", System.StringComparison.InvariantCultureIgnoreCase)
select new {
message = message,
processingAttemptsLast = DynamicEnumerable.LastOrDefault(message.ProcessingAttempts),
__document_id = message.__document_id
} into this0
select new {
PhysicalAddress = this0.processingAttemptsLast.FailureDetails.AddressOfFailingEndpoint,
FailedMessageCount = 1,
__document_id = this0.__document_id
});
this.ReduceDefinition = results =>
from result in results
group result by result.PhysicalAddress into g
select new {
PhysicalAddress = g.Key,
FailedMessageCount = Enumerable.Sum(g, (Func<dynamic, int>)(m => ((int)m.FailedMessageCount)))
};
this.GroupByExtraction = result => result.PhysicalAddress;
this.AddField("PhysicalAddress");
this.AddField("FailedMessageCount");
this.AddQueryParameterForMap("__document_id");
this.AddQueryParameterForMap("processingAttemptsLast.FailureDetails.AddressOfFailingEndpoint");
this.AddQueryParameterForReduce("__document_id");
this.AddQueryParameterForReduce("processingAttemptsLast.FailureDetails.AddressOfFailingEndpoint");
}
}
Binary file not shown.
Loading

0 comments on commit a55aca6

Please sign in to comment.