Skip to content

Commit d87fa87

Browse files
[create-pull-request] automated change
1 parent 5719d06 commit d87fa87

13 files changed

Lines changed: 33 additions & 33 deletions

File tree

src/dotnetCampus.OfficeDocumentZipper/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Windows;
22

3-
[assembly:ThemeInfo(
3+
[assembly: ThemeInfo(
44
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
55
//(used if a resource is not found in the page,
66
// or application resource dictionaries)

src/dotnetCampus.OpenXMLUnitConverter/EmuRectangle.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public override int GetHashCode()
7272
/// <summary>
7373
/// 判断相等
7474
/// </summary>
75-
public static bool operator ==(in EmuRectangle left,in EmuRectangle right)
75+
public static bool operator ==(in EmuRectangle left, in EmuRectangle right)
7676
{
7777
return left.Equals(right);
7878
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
using System.Runtime.CompilerServices;
22

3-
[assembly:InternalsVisibleTo("dotnetCampus.OpenXMLUnitConverter.Tests")]
3+
[assembly: InternalsVisibleTo("dotnetCampus.OpenXMLUnitConverter.Tests")]

src/dotnetCampus.OpenXmlUnitConverter/Degree.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public override bool Equals(object? obj)
7979
}
8080
else
8181
{
82-
Degree p = (Degree) obj;
82+
Degree p = (Degree)obj;
8383
return IntValue == p.IntValue;
8484
}
8585
}
@@ -129,7 +129,7 @@ public override int GetHashCode()
129129
/// <param name="b"></param>
130130
/// <returns></returns>
131131
public static Degree operator *(Degree a, double b)
132-
=> new Degree(((int) (a.IntValue * b)));
132+
=> new Degree(((int)(a.IntValue * b)));
133133

134134
/// <summary>
135135
/// 倍数乘以角度,效果和角度乘以倍数相同
@@ -138,7 +138,7 @@ public override int GetHashCode()
138138
/// <param name="b"></param>
139139
/// <returns></returns>
140140
public static Degree operator *(double a, Degree b)
141-
=> new Degree(((int) (a * b.IntValue)));
141+
=> new Degree(((int)(a * b.IntValue)));
142142

143143
/// <summary>
144144
/// 角度除以倍数
@@ -153,7 +153,7 @@ public override int GetHashCode()
153153
throw new DivideByZeroException();
154154
}
155155

156-
return new Degree((int) (a.IntValue / b));
156+
return new Degree((int)(a.IntValue / b));
157157
}
158158

159159
/// <summary>
@@ -215,7 +215,7 @@ public override int GetHashCode()
215215
/// <returns></returns>
216216
public static Degree FromDouble(double value)
217217
{
218-
int v = (int) (value * Precision);
218+
int v = (int)(value * Precision);
219219
return new Degree(v);
220220
}
221221
}

src/dotnetCampus.OpenXmlUnitConverter/Legacy/Degree.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public override bool Equals(object obj)
5050
}
5151
else
5252
{
53-
Degree p = (Degree) obj;
53+
Degree p = (Degree)obj;
5454
return IntValue == p.IntValue;
5555
}
5656
}
@@ -70,10 +70,10 @@ public override int GetHashCode()
7070
=> a + (-b);
7171

7272
public static Degree operator *(Degree a, double b)
73-
=> new Degree(((int) (a.IntValue * b)));
73+
=> new Degree(((int)(a.IntValue * b)));
7474

7575
public static Degree operator *(double a, Degree b)
76-
=> new Degree(((int) (a * b.IntValue)));
76+
=> new Degree(((int)(a * b.IntValue)));
7777

7878
public static Degree operator /(Degree a, double b)
7979
{
@@ -82,7 +82,7 @@ public override int GetHashCode()
8282
throw new DivideByZeroException();
8383
}
8484

85-
return new Degree((int) (a.IntValue / b));
85+
return new Degree((int)(a.IntValue / b));
8686
}
8787

8888
public static bool operator >(Degree a, Degree b)
@@ -103,7 +103,7 @@ public override int GetHashCode()
103103

104104
public static Degree FromDouble(double value)
105105
{
106-
int v = (int) (value * Precision);
106+
int v = (int)(value * Precision);
107107
return new Degree(v);
108108
}
109109

src/dotnetCampus.OpenXmlUnitConverter/Legacy/LegacyUnit.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public abstract class LegacyUnit<T, TLegacy>
1515
public static implicit operator T(LegacyUnit<T, TLegacy> legacyUnit)
1616
{
1717
var legacyValue = legacyUnit.GetType().GetProperty("Value", typeof(double))!.GetValue(legacyUnit);
18-
return (T) typeof(T).GetConstructor(new[] {typeof(double)})!.Invoke(null, new object[] {legacyValue});
18+
return (T)typeof(T).GetConstructor(new[] { typeof(double) })!.Invoke(null, new object[] { legacyValue });
1919
}
2020
}
2121
}

src/dotnetCampus.OpenXmlUnitConverter/Legacy/Percentage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public Percentage(string percentageText)
4545

4646
public static Percentage FromDouble(double value)
4747
{
48-
int v = (int) (value * Precision);
48+
int v = (int)(value * Precision);
4949
return new Percentage(v);
5050
}
5151

@@ -74,7 +74,7 @@ public override bool Equals(object obj)
7474
}
7575
else
7676
{
77-
Percentage p = (Percentage) obj;
77+
Percentage p = (Percentage)obj;
7878
return IntValue == p.IntValue;
7979
}
8080
}

src/dotnetCampus.OpenXmlUnitConverter/Percentage.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ internal Percentage(string percentageText)
4848
var newPercentageText = percentageText.Substring(0, percentageText.Length - 1);
4949
if (double.TryParse(newPercentageText, out var doubleValue))
5050
{
51-
IntValue = (int) Math.Round(doubleValue * 1000);
51+
IntValue = (int)Math.Round(doubleValue * 1000);
5252

5353
return;
5454
}
@@ -88,7 +88,7 @@ internal Percentage(string percentageText)
8888
/// </summary>
8989
public static Percentage FromDouble(double value)
9090
{
91-
var v = (int) (value * Precision);
91+
var v = (int)(value * Precision);
9292
return new Percentage(v);
9393
}
9494

@@ -118,7 +118,7 @@ public override bool Equals(object obj)
118118

119119
if (GetType() != obj.GetType()) return false;
120120

121-
var p = (Percentage) obj;
121+
var p = (Percentage)obj;
122122
return IntValue == p.IntValue;
123123
}
124124

tests/dotnetCampus.OpenXmlUnitConverter.Tests/EmuRectangleTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Microsoft.VisualStudio.TestTools.UnitTesting;
1+
using Microsoft.VisualStudio.TestTools.UnitTesting;
22
using MSTest.Extensions.Contracts;
33

44
namespace dotnetCampus.OpenXmlUnitConverter.Tests
@@ -9,7 +9,7 @@ public class EmuRectangleTest
99
[ContractTestCase]
1010
public void CreateEmuRectangle()
1111
{
12-
"给定矩形各个边角的值,可以计算出矩形的宽度和高度".Test(() =>
12+
"给定矩形各个边角的值,可以计算出矩形的宽度和高度".Test(() =>
1313
{
1414
// Arrange
1515
var emuRectangle = new EmuRectangle(new Emu(0), new Emu(0), new Emu(100), new Emu(100));

tests/dotnetCampus.OpenXmlUnitConverter.Tests/MillisecondTimeTest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using DocumentFormat.OpenXml;
33
using DocumentFormat.OpenXml.Presentation;
44
using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -12,7 +12,7 @@ public class MillisecondTimeTest
1212
[ContractTestCase]
1313
public void FromMilliseconds()
1414
{
15-
"提供从毫秒创建的方法,可以从给定的毫秒进行创建 MillisecondTime 结构体".Test(() =>
15+
"提供从毫秒创建的方法,可以从给定的毫秒进行创建 MillisecondTime 结构体".Test(() =>
1616
{
1717
var milliseconds = 300;
1818
var millisecondTime = MillisecondTime.FromMilliseconds(milliseconds);
@@ -23,21 +23,21 @@ public void FromMilliseconds()
2323
[ContractTestCase]
2424
public void ParseMillisecondTimeText()
2525
{
26-
"传入 null 的 OpenXML 字符串,可以说明未解析".Test(() =>
26+
"传入 null 的 OpenXML 字符串,可以说明未解析".Test(() =>
2727
{
2828
StringValue stringValue = null!;
2929
var millisecondTime = new MillisecondTime(stringValue);
3030
Assert.AreEqual(true, millisecondTime.IsIndefinite);
3131
});
3232

33-
"传入未定义的 OpenXML 字符串,可以说明未解析".Test(() =>
33+
"传入未定义的 OpenXML 字符串,可以说明未解析".Test(() =>
3434
{
3535
var stringValue = new StringValue(IndefiniteTimeDeclarationValues.Indefinite.ToString());
3636
var millisecondTime = new MillisecondTime(stringValue);
3737
Assert.AreEqual(true, millisecondTime.IsIndefinite);
3838
});
3939

40-
"传入数值表示的毫秒时间的 OpenXML 字符串,可以解析出毫秒时间".Test(() =>
40+
"传入数值表示的毫秒时间的 OpenXML 字符串,可以解析出毫秒时间".Test(() =>
4141
{
4242
var n = 123;
4343
var stringValue = new StringValue(n.ToString());

0 commit comments

Comments
 (0)