mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
simple refactoring
This commit is contained in:
parent
469eea16bb
commit
120b19d036
@ -7,11 +7,12 @@ namespace DCFApixels.DragonECS
|
||||
|
||||
internal unsafe static class EcsMetaAttributeHalper
|
||||
{
|
||||
internal const string EMPTY_NO_SENSE_MESSAGE = "With empty parameters, this attribute makes no sense.";
|
||||
[ThreadStatic]
|
||||
private static string[] _splitBuffer;
|
||||
public static string[] Split(char separator, string value)
|
||||
{
|
||||
if(_splitBuffer == null)
|
||||
if (_splitBuffer == null)
|
||||
{
|
||||
_splitBuffer = new string[128];
|
||||
}
|
||||
@ -24,7 +25,7 @@ namespace DCFApixels.DragonECS
|
||||
{
|
||||
if (reader.current != null)
|
||||
{
|
||||
if(_splitBuffer.Length == bufferIndex)
|
||||
if (_splitBuffer.Length == bufferIndex)
|
||||
{
|
||||
Array.Resize(ref _splitBuffer, _splitBuffer.Length << 1);
|
||||
}
|
||||
@ -33,7 +34,7 @@ namespace DCFApixels.DragonECS
|
||||
}
|
||||
}
|
||||
|
||||
string[] result = new string[bufferIndex];
|
||||
string[] result = new string[bufferIndex];
|
||||
for (int i = 0; i < bufferIndex; i++)
|
||||
{
|
||||
result[i] = _splitBuffer[i];
|
||||
|
@ -12,7 +12,7 @@ namespace DCFApixels.DragonECS
|
||||
public const char SEPARATOR = '/';
|
||||
public readonly MetaGroup Data;
|
||||
|
||||
[Obsolete("With empty parameters, this attribute makes no sense.")]
|
||||
[Obsolete(EcsMetaAttributeHalper.EMPTY_NO_SENSE_MESSAGE)]
|
||||
public MetaGroupAttribute() { }
|
||||
public MetaGroupAttribute(string name)
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ namespace DCFApixels.DragonECS
|
||||
get { return _tags; }
|
||||
}
|
||||
|
||||
[Obsolete("With empty parameters, this attribute makes no sense.")]
|
||||
[Obsolete(EcsMetaAttributeHalper.EMPTY_NO_SENSE_MESSAGE)]
|
||||
public MetaTagsAttribute() { }
|
||||
public MetaTagsAttribute(string tags)
|
||||
{
|
||||
|
@ -1,5 +1,4 @@
|
||||
using DCFApixels.DragonECS.Internal;
|
||||
using DCFApixels.DragonECS.RunnersCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
|
@ -1,12 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace DCFApixels.DragonECS.DI.Internal
|
||||
{
|
||||
internal class Throw
|
||||
{
|
||||
public static void ArgumentNull()
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 790577d4144473d448401799f01ddf50
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue
Block a user