Commit Graph

4287 Commits

Author SHA1 Message Date
Paul Pacheco
fdc21582db simplify module weaving 2020-09-22 11:45:31 -05:00
Paul Pacheco
e79ffeaa8e Use string interpolation 2020-09-22 11:40:13 -05:00
Paul Pacheco
b113fd4ecf KISS 2020-09-22 11:23:24 -05:00
Paul Pacheco
6c7e578d5a Remove redundant validations 2020-09-22 11:22:36 -05:00
Paul Pacheco
3e8870f791 we only weave one assembly at a time, no need for array 2020-09-22 10:11:07 -05:00
Paul Pacheco
eaf6ac66f0 output directory is always null, no need to pass it around 2020-09-22 10:06:13 -05:00
Paul Pacheco
eadb029393 Rename methods for clarity 2020-09-22 09:53:23 -05:00
Paul Pacheco
9d7c9069d7 Simplify namespace 2020-09-22 08:17:06 -05:00
Paul Pacheco
0fbcefe8df Follow naming convention 2020-09-22 08:16:04 -05:00
Paul Pacheco
85d26ebce6 type safe type comparison 2020-09-21 23:00:30 -05:00
Paul Pacheco
541b516d60 Remove unused parameter 2020-09-21 17:09:13 -05:00
Paul Pacheco
030dc86ea9 Namespace simplifications 2020-09-21 17:08:46 -05:00
Paul Pacheco
12debf1c8c Simplify namespace 2020-09-21 17:05:20 -05:00
Paul Pacheco
f77186e1d1 Simplify namespace 2020-09-21 17:00:57 -05:00
Paul Pacheco
d123e03915 Simplify namespace 2020-09-21 17:00:10 -05:00
Paul Pacheco
8fcbba50c4 Remove unused parameter 2020-09-21 16:59:05 -05:00
Paul Pacheco
7347e5700d Remove unused parameter 2020-09-21 16:58:33 -05:00
Paul Pacheco
76ce3796eb Simplify attribute namespace 2020-09-21 16:58:08 -05:00
Paul Pacheco
ca418457e8 Simplify guard check 2020-09-21 16:57:22 -05:00
Paul Pacheco
65f6e42b53 Simplify namespaces 2020-09-21 16:53:01 -05:00
James Frowen
783c6d2174
Update index.md
fixing links at top
2020-09-21 12:27:54 +01:00
James Frowen
94419ba003
Update ApiConnector.cs
adding null check for when listserver fails to be created
2020-09-20 00:44:13 +01:00
Patrik Daňo
8286062d9d
Fix the logo position (#2265) 2020-09-19 20:12:09 +02:00
James Frowen
44401ab3bf
Update NetworkHeadlessLogger.cs 2020-09-19 11:30:41 +01:00
vis2k
c776b88e69 docs: background updated 2020-09-19 11:09:00 +02:00
vis2k
d9cb416501 docs: logo size fixed 2020-09-19 11:02:17 +02:00
vis2k
e569754962 docs: favicon updated 2020-09-19 10:16:15 +02:00
vis2k
112408e0eb docs: logo updated 2020-09-19 10:08:14 +02:00
vis2k
d559bcfea7 Icon updated to half M 2020-09-19 10:01:10 +02:00
Paul Pacheco
07d290fd8c
Enhance code readability by using extension method (#2260)
# Before

This is hard to read:
```
if (ca.AttributeType.FullName == typeof(Mirror.CommandAttribute).FullName) {
...
}
```

# After

```
if (ca.AttributeType.Is<Mirror.CommandAttribute>()) {
...
}
```
2020-09-18 14:54:51 -05:00
James Frowen
7919942110
Splitting up test function
* Update NetworkServerTest.cs

splitting up test

* Update NetworkServer.cs

using string interpolation
2020-09-18 20:47:54 +01:00
Paul Pacheco
e50ea6318f
perf(weaver): No need to manually load mirror and unity assemblies (#2261) 2020-09-18 14:32:14 -05:00
James Frowen
a573bccc79
Update ApiUpdater.cs 2020-09-18 20:14:10 +01:00
Paul Pacheco
0b5989f87d Move overloads together 2020-09-18 13:06:34 -05:00
Paul Pacheco
6cfdd6469a
Simplify type lookup in weaver (#2258)
# Before
WeaverTypes declared a static variable like this:
```cs
public static TypeReference int32Type;
```
Weavertypes then loaded the variable in SetupTargetTypes like this:
```cs
int32Type = ImportSystemModuleType(currentAssembly, systemModule, "System.Int32");
```
Note we lookup the type with a string,  any typo there won't be detected until the code is executed.  It will also not be found by the IDE when you click "find references",  or when you refactor.

Then we use it like this:
```cs
var intType = WeaverTypes.int32Type;
```
This is a DRY violation: I have to modify 3 different code sections just to say that I want the int32 type.

# After
Get rid of all the duplication, and use the type instead of a string:
```cs
var intType = WeaverTypes.Import<int>();
```
No need for static variable,  or to add it in SetupTargetTypes.
2020-09-18 13:05:16 -05:00
vis2k
9d49a25c7b
Update README.md 2020-09-18 16:36:10 +02:00
vis2k
0c848a535f
Update README.md 2020-09-18 16:34:15 +02:00
vis2k
928145df58
Update README.md 2020-09-18 11:37:31 +02:00
James Frowen
13be048f81
Update toc.yml
removing ? from toc
2020-09-17 23:59:28 +01:00
James Frowen
fd80ef734b
Update TCPvsUDP.md 2020-09-17 23:38:25 +01:00
James Frowen
a03df2b8d5
Update index.md
* adding list
* adding node at bottom on how to submit
2020-09-17 23:18:09 +01:00
James Frowen
1370085f2e
Adding user guide mirror quick start guide (#2239)
* adding Mirror Quick Start Guide

* proof read
2020-09-17 22:42:43 +01:00
James Frowen
8dac53ce3c
making InvokeUserCode use correct type in argument (#2259) 2020-09-17 22:41:37 +01:00
James Frowen
b1429df53a
Update toc.yml 2020-09-17 16:15:51 +01:00
James Frowen
7e7b1405ec
Update toc.yml 2020-09-17 16:13:35 +01:00
James Frowen
71dd5835ad
Update index.md
making links include Network
2020-09-17 00:29:55 +01:00
James Frowen
514a61d8d3
Docs tcp vs udp (#2257)
* renaming page

* changing start and end blocks

* updating blocks on tcp and udp

* moving lines above features

* moving links to header
2020-09-17 00:28:40 +01:00
James Frowen
8209a7319a
Update README.md 2020-09-16 22:29:09 +01:00
James Frowen
b86a611674
Restructure docs (#2249)
* moving all guides to Articles folder

* updating toc for root and articles

* fixing toc

* css on side toc

* fixing links on index
2020-09-16 22:27:05 +01:00
James Frowen
c69d8cca0b
flip equals to return early (#2245)
* flip equals to return early

* flip equals to return early

* removing un-needed comment
2020-09-16 12:05:43 +01:00