forked from ApexGameTools/Apex-Game-Tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Thomas Scheelhardt
committed
May 28, 2019
1 parent
abf2b3b
commit e4f4b02
Showing
1,818 changed files
with
451,323 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[Ll]ibrary/ | ||
[Tt]emp/ | ||
[Oo]bj/ | ||
[Pp]ackages/ | ||
[Ll]ogs/ | ||
[Pp]recompiled/ | ||
|
||
[Bb]in/ | ||
|
||
/**/.vs | ||
# Autogenerated VS/MD solution and project files | ||
/*.suo | ||
/*.user | ||
/*.pidb | ||
/*.psess | ||
/*.vsp | ||
/*.userprefs | ||
/*.sln | ||
/*.csproj | ||
/*.DotSettings | ||
/*.shfbproj_* | ||
/**/*.ttout* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.28307.572 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApexSerialization", "ApexSerialization\ApexSerialization.csproj", "{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApexShared", "ApexShared\ApexShared\ApexShared.csproj", "{587BA07A-45B8-43E8-9185-0E3C567FD285}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApexSharedEditor", "ApexShared\ApexSharedEditor\ApexSharedEditor.csproj", "{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Unity2017 = Debug|Unity2017 | ||
Debug|Unity2018 = Debug|Unity2018 | ||
Debug|Unity4 = Debug|Unity4 | ||
Debug|Unity5 = Debug|Unity5 | ||
Release|Unity2017 = Release|Unity2017 | ||
Release|Unity2018 = Release|Unity2018 | ||
Release|Unity4 = Release|Unity4 | ||
Release|Unity5 = Release|Unity5 | ||
ReleaseWithDocs|Unity2017 = ReleaseWithDocs|Unity2017 | ||
ReleaseWithDocs|Unity2018 = ReleaseWithDocs|Unity2018 | ||
ReleaseWithDocs|Unity4 = ReleaseWithDocs|Unity4 | ||
ReleaseWithDocs|Unity5 = ReleaseWithDocs|Unity5 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.Debug|Unity2017.ActiveCfg = Debug|Unity2017 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.Debug|Unity2017.Build.0 = Debug|Unity2017 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.Debug|Unity2018.ActiveCfg = Debug|Unity2018 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.Debug|Unity2018.Build.0 = Debug|Unity2018 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.Debug|Unity4.ActiveCfg = Debug|Unity4 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.Debug|Unity4.Build.0 = Debug|Unity4 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.Debug|Unity5.ActiveCfg = Debug|Unity5 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.Debug|Unity5.Build.0 = Debug|Unity5 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.Release|Unity2017.ActiveCfg = Release|Unity2017 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.Release|Unity2017.Build.0 = Release|Unity2017 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.Release|Unity2018.ActiveCfg = Release|Unity2018 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.Release|Unity2018.Build.0 = Release|Unity2018 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.Release|Unity4.ActiveCfg = Release|Unity4 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.Release|Unity4.Build.0 = Release|Unity4 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.Release|Unity5.ActiveCfg = Release|Unity5 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.Release|Unity5.Build.0 = Release|Unity5 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.ReleaseWithDocs|Unity2017.ActiveCfg = ReleaseWithDocs|Unity2017 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.ReleaseWithDocs|Unity2017.Build.0 = ReleaseWithDocs|Unity2017 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.ReleaseWithDocs|Unity2018.ActiveCfg = ReleaseWithDocs|Unity2018 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.ReleaseWithDocs|Unity2018.Build.0 = ReleaseWithDocs|Unity2018 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.ReleaseWithDocs|Unity4.ActiveCfg = ReleaseWithDocs|Unity4 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.ReleaseWithDocs|Unity4.Build.0 = ReleaseWithDocs|Unity4 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.ReleaseWithDocs|Unity5.ActiveCfg = ReleaseWithDocs|Unity5 | ||
{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}.ReleaseWithDocs|Unity5.Build.0 = ReleaseWithDocs|Unity5 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.Debug|Unity2017.ActiveCfg = Debug|Unity2017 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.Debug|Unity2017.Build.0 = Debug|Unity2017 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.Debug|Unity2018.ActiveCfg = Debug|Unity2018 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.Debug|Unity2018.Build.0 = Debug|Unity2018 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.Debug|Unity4.ActiveCfg = Debug|Unity4 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.Debug|Unity4.Build.0 = Debug|Unity4 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.Debug|Unity5.ActiveCfg = Debug|Unity5 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.Debug|Unity5.Build.0 = Debug|Unity5 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.Release|Unity2017.ActiveCfg = Release|Unity2017 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.Release|Unity2017.Build.0 = Release|Unity2017 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.Release|Unity2018.ActiveCfg = Release|Unity2018 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.Release|Unity2018.Build.0 = Release|Unity2018 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.Release|Unity4.ActiveCfg = Release|Unity4 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.Release|Unity4.Build.0 = Release|Unity4 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.Release|Unity5.ActiveCfg = Release|Unity5 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.Release|Unity5.Build.0 = Release|Unity5 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.ReleaseWithDocs|Unity2017.ActiveCfg = ReleaseWithDocs|Unity2017 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.ReleaseWithDocs|Unity2017.Build.0 = ReleaseWithDocs|Unity2017 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.ReleaseWithDocs|Unity2018.ActiveCfg = ReleaseWithDocs|Unity2018 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.ReleaseWithDocs|Unity2018.Build.0 = ReleaseWithDocs|Unity2018 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.ReleaseWithDocs|Unity4.ActiveCfg = ReleaseWithDocs|Unity4 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.ReleaseWithDocs|Unity4.Build.0 = ReleaseWithDocs|Unity4 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.ReleaseWithDocs|Unity5.ActiveCfg = ReleaseWithDocs|Unity5 | ||
{587BA07A-45B8-43E8-9185-0E3C567FD285}.ReleaseWithDocs|Unity5.Build.0 = ReleaseWithDocs|Unity5 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.Debug|Unity2017.ActiveCfg = Debug|Unity2017 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.Debug|Unity2017.Build.0 = Debug|Unity2017 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.Debug|Unity2018.ActiveCfg = Debug|Unity2018 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.Debug|Unity2018.Build.0 = Debug|Unity2018 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.Debug|Unity4.ActiveCfg = Debug|Unity4 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.Debug|Unity4.Build.0 = Debug|Unity4 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.Debug|Unity5.ActiveCfg = Debug|Unity5 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.Debug|Unity5.Build.0 = Debug|Unity5 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.Release|Unity2017.ActiveCfg = Release|Unity2017 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.Release|Unity2017.Build.0 = Release|Unity2017 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.Release|Unity2018.ActiveCfg = Release|Unity2018 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.Release|Unity2018.Build.0 = Release|Unity2018 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.Release|Unity4.ActiveCfg = Release|Unity4 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.Release|Unity4.Build.0 = Release|Unity4 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.Release|Unity5.ActiveCfg = Release|Unity5 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.Release|Unity5.Build.0 = Release|Unity5 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.ReleaseWithDocs|Unity2017.ActiveCfg = ReleaseWithDocs|Unity2017 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.ReleaseWithDocs|Unity2017.Build.0 = ReleaseWithDocs|Unity2017 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.ReleaseWithDocs|Unity2018.ActiveCfg = ReleaseWithDocs|Unity2018 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.ReleaseWithDocs|Unity2018.Build.0 = ReleaseWithDocs|Unity2018 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.ReleaseWithDocs|Unity4.ActiveCfg = ReleaseWithDocs|Unity4 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.ReleaseWithDocs|Unity4.Build.0 = ReleaseWithDocs|Unity4 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.ReleaseWithDocs|Unity5.ActiveCfg = ReleaseWithDocs|Unity5 | ||
{222FCCEE-9813-4D0D-B8F1-B3EE0D1B6014}.ReleaseWithDocs|Unity5.Build.0 = ReleaseWithDocs|Unity5 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {199BE84C-352B-402C-9074-0461A4DF3896} | ||
EndGlobalSection | ||
EndGlobal |
133 changes: 133 additions & 0 deletions
133
Apex Libraries/ApexSerialization/ApexSerialization.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">Unity4</Platform> | ||
<ProjectGuid>{7DEB45DD-60B9-42A2-B33D-AF565846BAAE}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Apex.Serialization</RootNamespace> | ||
<AssemblyName>ApexSerialization</AssemblyName> | ||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<TargetFrameworkProfile>Unity Subset v3.5</TargetFrameworkProfile> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>..\..\Precompiled\$(Platform)\Apex Serialization\</OutputPath> | ||
<DefineConstants>TRACE;DEBUG</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>..\..\Precompiled\$(Platform)\Apex Serialization\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)' == 'ReleaseWithDocs' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>..\..\Precompiled\$(Platform)\Apex Serialization\</OutputPath> | ||
<DocumentationFile>..\..\Precompiled\$(Platform)\Apex Serialization\$(AssemblyName).XML</DocumentationFile> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Platform)' == 'Unity4' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Platform)' == 'Unity5' "> | ||
<DefineConstants>$(DefineConstants);UNITY_5</DefineConstants> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Platform)' == 'Unity2017' "> | ||
<DefineConstants>$(DefineConstants);UNITY_2017</DefineConstants> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Platform)' == 'Unity2018' "> | ||
<DefineConstants>$(DefineConstants);UNITY_2017</DefineConstants> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="UnityEngine"> | ||
<HintPath>..\..\References\Unity2018\UnityEngine.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="ApexSerializationAttribute.cs" /> | ||
<Compile Include="ApexSerializedTypeAttribute.cs" /> | ||
<Compile Include="Converters\DoubleConverter.cs" /> | ||
<Compile Include="Converters\BoolConverter.cs" /> | ||
<Compile Include="Converters\FloatConverter.cs" /> | ||
<Compile Include="Converters\EnumConverter.cs" /> | ||
<Compile Include="Converters\DateTimeConverter.cs" /> | ||
<Compile Include="IInitializeAfterDeserialization.cs" /> | ||
<Compile Include="IPrepareForSerialization.cs" /> | ||
<Compile Include="ISerializer.cs" /> | ||
<Compile Include="IValueConverter.cs" /> | ||
<Compile Include="Json\IJsonParser.cs" /> | ||
<Compile Include="Json\IJsonWriter.cs" /> | ||
<Compile Include="Json\JsonParser.cs" /> | ||
<Compile Include="Json\JsonPrettyWriter.cs" /> | ||
<Compile Include="Json\JsonCompactWriter.cs" /> | ||
<Compile Include="Json\JsonSerializer.cs" /> | ||
<Compile Include="Json\StagedToJson.cs" /> | ||
<Compile Include="Json\StringHandler.cs" /> | ||
<Compile Include="SerializationExtensions.cs" /> | ||
<Compile Include="SerializationMaster.cs" /> | ||
<Compile Include="SerializationOverrideAttribute.cs" /> | ||
<Compile Include="StageNull.cs" /> | ||
<Compile Include="StageAttribute.cs" /> | ||
<Compile Include="StageList.cs" /> | ||
<Compile Include="Stagers\BoundsStager.cs" /> | ||
<Compile Include="Stagers\DictionaryStager.cs" /> | ||
<Compile Include="Stagers\ListStager.cs" /> | ||
<Compile Include="StageValue.cs" /> | ||
<Compile Include="StageItem.cs" /> | ||
<Compile Include="StageElement.cs" /> | ||
<Compile Include="StageContainer.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="IStager.cs" /> | ||
<Compile Include="Stagers\AnimationCurveStager.cs" /> | ||
<Compile Include="Converters\CharConverter.cs" /> | ||
<Compile Include="Stagers\ColorStager.cs" /> | ||
<Compile Include="Converters\GuidConverter.cs" /> | ||
<Compile Include="Converters\LayerMaskConverter.cs" /> | ||
<Compile Include="Converters\PrimitivesConverter.cs" /> | ||
<Compile Include="Stagers\RectStager.cs" /> | ||
<Compile Include="Converters\StringConverter.cs" /> | ||
<Compile Include="Stagers\Vector2Stager.cs" /> | ||
<Compile Include="Stagers\Vector3Stager.cs" /> | ||
<Compile Include="Stagers\Vector4Stager.cs" /> | ||
<Compile Include="StringBuffer.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="..\..\ApexGameTools.licenseheader"> | ||
<Link>ApexGameTools.licenseheader</Link> | ||
</None> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\ApexShared\ApexShared\ApexShared.csproj"> | ||
<Project>{587ba07a-45b8-43e8-9185-0e3c567fd285}</Project> | ||
<Name>ApexShared</Name> | ||
<Private>False</Private> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
49 changes: 49 additions & 0 deletions
49
Apex Libraries/ApexSerialization/ApexSerializationAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* Copyright © 2014 Apex Software. All rights reserved. */ | ||
namespace Apex.Serialization | ||
{ | ||
using System; | ||
|
||
/// <summary> | ||
/// Attribute to mark members (properties and fields) on entities that should be serialized as part of an Apex serialization process. | ||
/// </summary> | ||
/// <seealso cref="System.Attribute" /> | ||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = true)] | ||
public sealed class ApexSerializationAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Gets or sets a value indicating whether to hide this member in the editor. | ||
/// </summary> | ||
/// <value> | ||
/// <c>true</c> to hide in editor; otherwise, <c>false</c>. | ||
/// </value> | ||
public bool hideInEditor | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets the default value. Members whose actual value matches the default value are not serialized (to save space). | ||
/// </summary> | ||
/// <value> | ||
/// The default value. | ||
/// </value> | ||
public object defaultValue | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets a value which allows the field or property to be excluded on a per request basis. | ||
/// </summary> | ||
/// <value> | ||
/// <c>true</c> if optional; otherwise, <c>false</c>. | ||
/// </value> | ||
public int excludeMask | ||
{ | ||
get; | ||
set; | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
Apex Libraries/ApexSerialization/ApexSerializedTypeAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* Copyright © 2014 Apex Software. All rights reserved. */ | ||
namespace Apex.Serialization | ||
{ | ||
using System; | ||
|
||
/// <summary> | ||
/// Optional attribute to mark types that are serialized as part of an Apex serialization process. | ||
/// Some types may not expose any serialized fields or properties (<see cref="ApexSerializationAttribute"/>) in which case marking them with this will help identify them as serialized types. | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] | ||
public sealed class ApexSerializedTypeAttribute : Attribute | ||
{ | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
Apex Libraries/ApexSerialization/Converters/BoolConverter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* Copyright © 2014 Apex Software. All rights reserved. */ | ||
namespace Apex.Serialization.Converters | ||
{ | ||
using System; | ||
|
||
/// <summary> | ||
/// Handles conversion of <see cref="bool"/>s. | ||
/// </summary> | ||
/// <seealso cref="Apex.Serialization.IValueConverter" /> | ||
public sealed class BoolConverter : IValueConverter | ||
{ | ||
/// <summary> | ||
/// Gets the types this converter can handle. | ||
/// </summary> | ||
/// <value> | ||
/// The handled types. | ||
/// </value> | ||
public Type[] handledTypes | ||
{ | ||
get { return new[] { typeof(bool) }; } | ||
} | ||
|
||
/// <summary> | ||
/// Converts a value to its string representation. | ||
/// </summary> | ||
/// <param name="value">The value to convert</param> | ||
/// <returns>The string representation of the value.</returns> | ||
public string ToString(object value) | ||
{ | ||
return ((bool)value) ? "true" : "false"; | ||
} | ||
|
||
/// <summary> | ||
/// Converts a string to the type handled by this converter. | ||
/// </summary> | ||
/// <param name="value">The value.</param> | ||
/// <param name="targetType">Type to convert to.</param> | ||
/// <returns> | ||
/// The converted value. | ||
/// </returns> | ||
public object FromString(string value, Type targetType) | ||
{ | ||
return !string.IsNullOrEmpty(value) && value[0] == 't'; | ||
} | ||
} | ||
} |
Oops, something went wrong.