Skip to content

Commit be57ef5

Browse files
committed
style: reformat code with dotnet format
1 parent 2de1c24 commit be57ef5

File tree

108 files changed

+1070
-995
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1070
-995
lines changed

src/NHibernate.Search.Tests/AlternateDocument.cs

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,51 @@
11
using NHibernate.Search.Attributes;
22

3-
namespace NHibernate.Search.Tests {
3+
namespace NHibernate.Search.Tests
4+
{
45
/// <summary> Example of 2 entities mapped in the same index</summary>
56
[Indexed(Index = "Documents")]
6-
public class AlternateDocument {
7+
public class AlternateDocument
8+
{
79
private int id;
810
private string title;
911
private string summary;
1012
private string text;
1113

12-
public AlternateDocument() {}
14+
public AlternateDocument() { }
1315

14-
public AlternateDocument(int id, string title, string summary, string text) {
16+
public AlternateDocument(int id, string title, string summary, string text)
17+
{
1518
this.id = id;
1619
this.title = title;
1720
this.summary = summary;
1821
this.text = text;
1922
}
2023

2124
[DocumentId]
22-
public virtual int Id {
25+
public virtual int Id
26+
{
2327
get { return id; }
2428
set { id = value; }
2529
}
2630

2731
[Field(Index.Tokenized, Store = Attributes.Store.Yes, Name = "alt_title")]
2832
[Boost(2)]
29-
public virtual string Title {
33+
public virtual string Title
34+
{
3035
get { return title; }
3136
set { title = value; }
3237
}
3338

3439
[Field(Index.Tokenized, Name = "Abstract", Store = Attributes.Store.No)]
35-
public virtual string Summary {
40+
public virtual string Summary
41+
{
3642
get { return summary; }
3743
set { summary = value; }
3844
}
3945

4046
[Field(Index.Tokenized, Store = Attributes.Store.No)]
41-
public virtual string Text {
47+
public virtual string Text
48+
{
4249
get { return text; }
4350
set { text = value; }
4451
}

src/NHibernate.Search.Tests/Analyzer/AnalyzerTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class AnalyzerTest : SearchTestCase
1212
{
1313
protected override IEnumerable<string> Mappings
1414
{
15-
get { return new string[] {"Analyzer.MyEntity.hbm.xml"}; }
15+
get { return new string[] { "Analyzer.MyEntity.hbm.xml" }; }
1616
}
1717

1818
[Test, Explicit("Broken after 3.0.3 upgrade")]

src/NHibernate.Search.Tests/Analyzer/MyEntity.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class MyEntity
1616
[Analyzer(typeof(Test2Analyzer))]
1717
private string property;
1818

19-
[Field(Index.Tokenized, Analyzer=typeof(Test3Analyzer))]
19+
[Field(Index.Tokenized, Analyzer = typeof(Test3Analyzer))]
2020
[Analyzer(typeof(Test2Analyzer))]
2121
private string field;
2222

src/NHibernate.Search.Tests/Bridge/BridgeTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ protected override void Configure(Configuration configuration)
2121

2222
protected override IEnumerable<string> Mappings
2323
{
24-
get { return new string[] {"Bridge.Cloud.hbm.xml"}; }
24+
get { return new string[] { "Bridge.Cloud.hbm.xml" }; }
2525
}
2626

2727
[Test]

src/NHibernate.Search.Tests/Bridge/CatDeptsFieldsClassBridge.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public void Set(string name, object value, Document document, FieldType fieldTyp
1818
// from the name field of the ClassBridge Annotation. This is not
1919
// a requirement. It just works that way in this instance. The
2020
// actual name could be supplied by hard coding it below.
21-
Departments dep = (Departments) value;
21+
Departments dep = (Departments)value;
2222
string fieldValue1 = dep.Branch ?? string.Empty;
2323
string fieldValue2 = dep.Network ?? string.Empty;
2424
string fieldValue = fieldValue1 + sepChar + fieldValue2;
@@ -37,7 +37,7 @@ public void Set(string name, object value, Document document, FieldType fieldTyp
3737

3838
public void SetParameterValues(Dictionary<string, object> parameters)
3939
{
40-
sepChar = (string) parameters["sepChar"];
40+
sepChar = (string)parameters["sepChar"];
4141
}
4242

4343
#endregion

src/NHibernate.Search.Tests/Bridge/CatFieldsClassBridge.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public void Set(string name, object value, Document document, FieldType fieldTyp
1717
// from the name field of the ClassBridge Annotation. This is not
1818
// a requirement. It just works that way in this instance. The
1919
// actual name could be supplied by hard coding it below.
20-
Department dep = (Department) value;
20+
Department dep = (Department)value;
2121
String fieldValue1 = dep.Branch ?? string.Empty;
2222
String fieldValue2 = dep.Network ?? string.Empty;
2323
String fieldValue = fieldValue1 + sepChar + fieldValue2;
@@ -36,7 +36,7 @@ public void Set(string name, object value, Document document, FieldType fieldTyp
3636

3737
public void SetParameterValues(Dictionary<string, object> parameters)
3838
{
39-
sepChar = (string) parameters["sepChar"];
39+
sepChar = (string)parameters["sepChar"];
4040
}
4141

4242
#endregion

src/NHibernate.Search.Tests/Bridge/ClassBridgeTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class ClassBridgeTest : SearchTestCase
2424
{
2525
protected override IEnumerable<string> Mappings
2626
{
27-
get { return new string[] {"Bridge.Department.hbm.xml", "Bridge.Departments.hbm.xml"}; }
27+
get { return new string[] { "Bridge.Department.hbm.xml", "Bridge.Departments.hbm.xml" }; }
2828
}
2929

3030
#region Tests
@@ -210,7 +210,7 @@ public void ClassBridgesWithProjection()
210210
// Note: This assertion fails when run with other tests because the id is assigned by the database, and previous tests have already used this value
211211
//Assert.AreEqual(1, ((Departments)projection[0]).Id, "id incorrect");
212212
Assert.IsTrue(projection[1] is Document, "DOCUMENT incorrect");
213-
Assert.AreEqual(8, ((Document)projection[1]).Fields.Count, "DOCUMENT size incorrect");
213+
Assert.AreEqual(8, ((Document)projection[1]).Fields.Count, "DOCUMENT size incorrect");
214214
Assert.IsNotNull(((Document)projection[1]).GetField("equiptype"), "equiptype is null");
215215
Assert.AreEqual(
216216
"Cisco", ((Document)projection[1]).GetField("equiptype").GetStringValue(), "equiptype incorrect");
@@ -227,7 +227,7 @@ public void ClassBridgesWithProjection()
227227
// NB This assertion causes the test to break when run with other tests - some leakage?
228228
//Assert.AreEqual(4, ((Departments)projection[0]).Id, "id incorrect");
229229
Assert.IsTrue(projection[1] is Document, "DOCUMENT incorrect");
230-
Assert.AreEqual(8, ((Document)projection[1]).Fields.Count, "DOCUMENT size incorrect");
230+
Assert.AreEqual(8, ((Document)projection[1]).Fields.Count, "DOCUMENT size incorrect");
231231
Assert.IsNotNull(((Document)projection[1]).GetField("equiptype"), "equiptype is null");
232232
Assert.AreEqual(
233233
"Cisco", ((Document)projection[1]).GetField("equiptype").GetStringValue(), "equiptype incorrect");

src/NHibernate.Search.Tests/Bridge/Cloud.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class Cloud
2929
private bool storm;
3030
private string string1;
3131
private CloudType type;
32-
private object[] fred = {"dividedBy"};
32+
private object[] fred = { "dividedBy" };
3333

3434
[Field(Index.Tokenized, Store = Attributes.Store.Yes)]
3535
[FieldBridge(typeof(TruncateFieldBridge))]

src/NHibernate.Search.Tests/Bridge/DateSplitBridge.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class DateSplitBridge : IFieldBridge
1010
{
1111
public void Set(string name, object value, Document document, FieldType fieldType, float? boost)
1212
{
13-
DateTime date = (DateTime) value;
13+
DateTime date = (DateTime)value;
1414

1515
int year = date.Year;
1616
int month = date.Month;

src/NHibernate.Search.Tests/Bridge/Department.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ namespace NHibernate.Search.Tests.Bridge
44

55
[Indexed]
66
[ClassBridge(typeof(CatFieldsClassBridge),
7-
Name="branchnetwork",
8-
Index=Index.Tokenized,
9-
Store=Attributes.Store.Yes)]
7+
Name = "branchnetwork",
8+
Index = Index.Tokenized,
9+
Store = Attributes.Store.Yes)]
1010
[Parameter("sepChar", " ")]
1111
public class Department
1212
{
@@ -29,7 +29,7 @@ public virtual int Id
2929
/// <summary>
3030
///
3131
/// </summary>
32-
[Field(Index.Tokenized, Store=Attributes.Store.Yes)]
32+
[Field(Index.Tokenized, Store = Attributes.Store.Yes)]
3333
public virtual string BranchHead
3434
{
3535
get { return branchHead; }
@@ -39,7 +39,7 @@ public virtual string BranchHead
3939
/// <summary>
4040
///
4141
/// </summary>
42-
[Field(Index.Tokenized, Store=Attributes.Store.Yes)]
42+
[Field(Index.Tokenized, Store = Attributes.Store.Yes)]
4343
public virtual string Network
4444
{
4545
get { return network; }
@@ -49,7 +49,7 @@ public virtual string Network
4949
/// <summary>
5050
///
5151
/// </summary>
52-
[Field(Index.Tokenized, Store=Attributes.Store.Yes)]
52+
[Field(Index.Tokenized, Store = Attributes.Store.Yes)]
5353
public virtual string Branch
5454
{
5555
get { return branch; }
@@ -59,7 +59,7 @@ public virtual string Branch
5959
/// <summary>
6060
///
6161
/// </summary>
62-
[Field(Index.UnTokenized, Store=Attributes.Store.Yes)]
62+
[Field(Index.UnTokenized, Store = Attributes.Store.Yes)]
6363
public virtual int MaxEmployees
6464
{
6565
get { return maxEmployees; }

0 commit comments

Comments
 (0)