Skip to content

Commit 62774f2

Browse files
author
Michael Hallett
committed
Converted tabs to spaces and corrected an error;
1 parent ea0b33a commit 62774f2

File tree

152 files changed

+20257
-19295
lines changed

Some content is hidden

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

152 files changed

+20257
-19295
lines changed

CONTRIBUTING.markdown

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ Follow these guidelines, in no particular order, to improve your chances of havi
88

99
* Make each pull request atomic and exclusive; don't send pull requests for a laundry list of changes.
1010
* Even better, commit in small manageable chunks.
11-
* Tabs, not spaces. Bracket style doesn't matter. Do not reformat code you didn't touch.
11+
* Spaces, not tabs. Bracket style doesn't matter. Do not reformat code you didn't touch.
1212
* Changes to XmlDeserializer or JsonDeserializer must be accompanied by a unit test covering the change.
13+
* In general, changes should be accompanied by unit tests to show what was broken and how your patch fixes it.
1314
* No regions except for license header
1415
* Code must build for .NET 3.5 Client Profile, Silverlight 4 and Windows Phone 7
1516
* If you didn't write the code you must provide a reference to where you obtained it and preferably the license.

RestSharp.Build/NuSpecUpdateTask.cs

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
using System;
2-
using System.Collections.Generic;
2+
using System.IO;
33
using System.Linq;
4-
using System.Text;
5-
using Microsoft.Build.Utilities;
64
using System.Reflection;
75
using System.Xml.Linq;
8-
using System.IO;
6+
using Microsoft.Build.Utilities;
97

108
namespace RestSharp.Build
119
{
@@ -25,10 +23,7 @@ public class NuSpecUpdateTask : Task
2523

2624
public string SourceAssemblyFile { get; set; }
2725

28-
public NuSpecUpdateTask()
29-
: this(null)
30-
{
31-
}
26+
public NuSpecUpdateTask() : this(null) { }
3227

3328
public NuSpecUpdateTask(Assembly assembly)
3429
{
@@ -37,7 +32,8 @@ public NuSpecUpdateTask(Assembly assembly)
3732

3833
public override bool Execute()
3934
{
40-
if (string.IsNullOrEmpty(this.SpecFile)) return false;
35+
if (string.IsNullOrEmpty(this.SpecFile))
36+
return false;
4137

4238
var path = Path.GetFullPath(this.SourceAssemblyFile);
4339
this._assembly = this._assembly ?? Assembly.LoadFile(path);
@@ -49,17 +45,16 @@ public override bool Execute()
4945
this.Description = this.GetDescription(this._assembly);
5046
this.Version = this.GetVersion(this._assembly);
5147

52-
this.GenerateComputedSpecFile();
53-
48+
this.GenerateComputedSpecFile();
49+
5450
return true;
5551
}
5652

5753
private void GenerateComputedSpecFile()
5854
{
5955
var doc = XDocument.Load(this.SpecFile);
60-
6156
var metaNode = doc.Descendants("metadata").First();
62-
57+
6358
this.ReplaceToken(metaNode, "id", this.Id);
6459
this.ReplaceToken(metaNode, "authors", this.Authors);
6560
this.ReplaceToken(metaNode, "owners", this.Authors);
@@ -111,12 +106,13 @@ private string GetVersion(Assembly asm)
111106
private TAttr GetAttribute<TAttr>(Assembly asm) where TAttr : Attribute
112107
{
113108
var attrs = asm.GetCustomAttributes(typeof(TAttr), false);
109+
114110
if (attrs.Length > 0)
115111
{
116112
return attrs[0] as TAttr;
117113
}
118114

119115
return null;
120-
}
116+
}
121117
}
122118
}

RestSharp.Build/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.Reflection;
2-
using System.Runtime.CompilerServices;
32
using System.Runtime.InteropServices;
43

54
// General Information about an assembly is controlled through the following
Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
3-
<system.diagnostics>
4-
<sources>
5-
<source name="System.Net" tracemode="includehex" maxdatasize="1024">
6-
<listeners>
7-
<add name="System.Net"/>
8-
</listeners>
9-
</source>
10-
</sources>
11-
<switches>
12-
<add name="System.Net" value="Verbose"/>
13-
</switches>
14-
<sharedListeners>
15-
<add name="System.Net" type="System.Diagnostics.TextWriterTraceListener" initializeData="network.log"/>
16-
</sharedListeners>
17-
<trace autoflush="true"/>
18-
</system.diagnostics>
19-
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
3+
<system.diagnostics>
4+
<sources>
5+
<source name="System.Net" tracemode="includehex" maxdatasize="1024">
6+
<listeners>
7+
<add name="System.Net"/>
8+
</listeners>
9+
</source>
10+
</sources>
11+
<switches>
12+
<add name="System.Net" value="Verbose"/>
13+
</switches>
14+
<sharedListeners>
15+
<add name="System.Net" type="System.Diagnostics.TextWriterTraceListener" initializeData="network.log"/>
16+
</sharedListeners>
17+
<trace autoflush="true"/>
18+
</system.diagnostics>
19+
<startup>
20+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
21+
</startup>
22+
</configuration>

0 commit comments

Comments
 (0)