Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
Fitzchak Yitzchaki committed May 7, 2012
1 parent 4cc016e commit f639387
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 29 deletions.
Expand Up @@ -16,4 +16,4 @@ public VersioningConfiguration()
MaxRevisions = int.MaxValue;
}
}
}
}
Expand Up @@ -14,4 +14,4 @@ public static T[] GetRevisionsFor<T>(this ISyncAdvancedSessionOperation session,
.ToArray();
}
}
}
}
8 changes: 4 additions & 4 deletions Raven.Abstractions/Data/JsonDocumentMetadata.cs
Expand Up @@ -11,19 +11,19 @@ namespace Raven.Abstractions.Data
public class JsonDocumentMetadata : IJsonDocumentMetadata
{
/// <summary>
/// Gets or sets the metadata for the document
/// Gets or sets the metadata for the document
/// </summary>
/// <value>The metadata.</value>
public RavenJObject Metadata { get; set; }

/// <summary>
/// Gets or sets the key for the document
/// Gets or sets the key for the document
/// </summary>
/// <value>The key.</value>
public string Key { get; set; }

/// <summary>
/// Gets or sets a value indicating whether this document is non authoritative (modified by uncommitted transaction).
/// Gets or sets a value indicating whether this document is non authoritative (modified by uncommitted transaction).
/// </summary>
public bool? NonAuthoritativeInformation { get; set; }

Expand All @@ -34,7 +34,7 @@ public class JsonDocumentMetadata : IJsonDocumentMetadata
public Guid? Etag { get; set; }

/// <summary>
/// Gets or sets the last modified date for the document
/// Gets or sets the last modified date for the document
/// </summary>
/// <value>The last modified.</value>
public DateTime? LastModified { get; set; }
Expand Down
5 changes: 4 additions & 1 deletion Raven.Database/Plugins/AbstractDeleteTrigger.cs
Expand Up @@ -18,7 +18,10 @@ public abstract class AbstractDeleteTrigger : IRequiresDocumentDatabaseInitializ
/// explanation why the DELETE was rejected.
/// </summary><remarks>
/// This method SHOULD NOT modify either the document or the metadata.
/// </remarks><param name="key">The document key</param><param name="transactionInformation">The current transaction, if any</param><returns>Whatever the put was vetoed or not</returns>
/// </remarks>
/// <param name="key">The document key</param>
/// <param name="transactionInformation">The current transaction, if any</param>
/// <returns>Whatever the delete was vetoed or not</returns>
public virtual VetoResult AllowDelete(string key, TransactionInformation transactionInformation)
{
return VetoResult.Allowed;
Expand Down
10 changes: 8 additions & 2 deletions Raven.Database/Plugins/AbstractPutTrigger.cs
Expand Up @@ -17,9 +17,15 @@ public abstract class AbstractPutTrigger: IRequiresDocumentDatabaseInitializatio
/// Ask the trigger whatever the PUT should be vetoed.
/// If the trigger vote to veto the PUT, it needs to provide a human readable
/// explanation why the PUT was rejected.
/// </summary><remarks>
/// </summary>
/// <remarks>
/// This method SHOULD NOT modify either the document or the metadata.
/// </remarks><param name="key">The document key</param><param name="document">The new document about to be put into Raven</param><param name="metadata">The new document metadata</param><param name="transactionInformation">The current transaction, if it exists</param><returns>Whatever the put was vetoed or not</returns>
/// </remarks>
/// <param name="key">The document key</param>
/// <param name="document">The new document about to be put into Raven</param>
/// <param name="metadata">The new document metadata</param>
/// <param name="transactionInformation">The current transaction, if it exists</param>
/// <returns>Whatever the put was vetoed or not</returns>
public virtual VetoResult AllowPut(string key, RavenJObject document, RavenJObject metadata, TransactionInformation transactionInformation)
{
return VetoResult.Allowed;
Expand Down
40 changes: 20 additions & 20 deletions Raven.Tests/Bugs/CanReadLuceneProjectedDateTimeOffset.cs
@@ -1,24 +1,24 @@
using System;
using System.IO;
using Raven.Imports.Newtonsoft.Json;
using Raven.Client.Document;
using Xunit;

namespace Raven.Tests.Bugs
{
public class CanReadLuceneProjectedDateTimeOffset
{
[Fact]
public void Can_read_date_time_offset_from_lucene_query()
{
var jsonSerializer = new DocumentConvention().CreateSerializer();
using System;
using System.IO;
using Raven.Imports.Newtonsoft.Json;
using Raven.Client.Document;
using Xunit;

namespace Raven.Tests.Bugs
{
public class CanReadLuceneProjectedDateTimeOffset
{
[Fact]
public void Can_read_date_time_offset_from_lucene_query()
{
var jsonSerializer = new DocumentConvention().CreateSerializer();
var deserialize = jsonSerializer.Deserialize<Test>(new JsonTextReader(new StringReader(@"{""Item"": ""20090402193554412""}")));
Assert.Equal(2009, deserialize.Item.Year);
Assert.Equal(2009, deserialize.Item.Year);
}

private class Test
{
public DateTimeOffset Item { get; set; }
}
}
private class Test
{
public DateTimeOffset Item { get; set; }
}
}
}

0 comments on commit f639387

Please sign in to comment.