-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code cleanup + nuspec + improved multiple files export
- Loading branch information
1 parent
c369416
commit 0356c38
Showing
68 changed files
with
1,580 additions
and
1,198 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 |
---|---|---|
@@ -1,27 +1,23 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Reinforced.Typings | ||
namespace Reinforced.Typings | ||
{ | ||
/// <summary> | ||
/// Represents member's access modifier | ||
/// Represents member's access modifier | ||
/// </summary> | ||
public enum AccessModifier | ||
{ | ||
/// <summary> | ||
/// private | ||
/// private | ||
/// </summary> | ||
Private, | ||
|
||
/// <summary> | ||
/// protected | ||
/// protected | ||
/// </summary> | ||
Protected, | ||
|
||
/// <summary> | ||
/// public | ||
/// public | ||
/// </summary> | ||
Public | ||
} | ||
} | ||
} |
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
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 |
---|---|---|
@@ -1,30 +1,24 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Reinforced.Typings.Attributes | ||
namespace Reinforced.Typings.Attributes | ||
{ | ||
/// <summary> | ||
/// Configuration interface for members supporting names overriding | ||
/// Configuration interface for members supporting names overriding | ||
/// </summary> | ||
public interface INameOverrideAttribute | ||
{ | ||
/// <summary> | ||
/// Name override | ||
/// Name override | ||
/// </summary> | ||
string Name { get; set; } | ||
} | ||
|
||
/// <summary> | ||
/// Configuration interface for members supporting camelCasing from attribute | ||
/// Configuration interface for members supporting camelCasing from attribute | ||
/// </summary> | ||
public interface ICamelCaseableAttribute | ||
{ | ||
/// <summary> | ||
/// camelCase flag | ||
/// camelCase flag | ||
/// </summary> | ||
bool ShouldBeCamelCased { get; set; } | ||
} | ||
} | ||
} |
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
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
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 |
---|---|---|
@@ -1,32 +1,28 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Reinforced.Typings.Attributes | ||
{ | ||
/// <summary> | ||
/// Denotes parameter name and constant value for constructor's :base call | ||
/// We need this attribute because it is programmatically impossible to determine :base call parameters | ||
/// via reflection. So in this case we need some help from user's side | ||
/// Denotes parameter name and constant value for constructor's :base call | ||
/// We need this attribute because it is programmatically impossible to determine :base call parameters | ||
/// via reflection. So in this case we need some help from user's side | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Constructor)] | ||
public class TsBaseParamAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Parameters for super() call | ||
/// Here should be stored TypeScript expressions | ||
/// </summary> | ||
public string[] Values { get; set; } | ||
|
||
/// <summary> | ||
/// Creates instance of TsBaseParamAttribute | ||
/// Creates instance of TsBaseParamAttribute | ||
/// </summary> | ||
/// <param name="values">Set of TypeScript expressions to be supplied for super() call</param> | ||
public TsBaseParamAttribute(params string[] values) | ||
{ | ||
Values = values; | ||
} | ||
|
||
/// <summary> | ||
/// Parameters for super() call | ||
/// Here should be stored TypeScript expressions | ||
/// </summary> | ||
public string[] Values { get; set; } | ||
} | ||
} | ||
} |
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
24 changes: 12 additions & 12 deletions
24
Reinforced.Typings/Attributes/TsDeclarationAttributeBase.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 |
---|---|---|
@@ -1,31 +1,31 @@ | ||
namespace Reinforced.Typings.Attributes | ||
{ | ||
/// <summary> | ||
/// Base attribute for so-called compilation unit (class, enum, interface etc) | ||
/// Base attribute for so-called compilation unit (class, enum, interface etc) | ||
/// </summary> | ||
public abstract class TsDeclarationAttributeBase : TsAttributeBase, INameOverrideAttribute | ||
{ | ||
/// <summary> | ||
/// Place to corresponding namespace | ||
/// Constructs new instance of TsDeclarationAttributeBase | ||
/// </summary> | ||
public virtual bool IncludeNamespace { get; set; } | ||
protected TsDeclarationAttributeBase() | ||
{ | ||
IncludeNamespace = true; | ||
} | ||
|
||
/// <summary> | ||
/// Overrides name | ||
/// Place to corresponding namespace | ||
/// </summary> | ||
public virtual string Name { get; set; } | ||
public virtual bool IncludeNamespace { get; set; } | ||
|
||
/// <summary> | ||
/// Overrides namespace | ||
/// Overrides namespace | ||
/// </summary> | ||
public virtual string Namespace { get; set; } | ||
|
||
/// <summary> | ||
/// Constructs new instance of TsDeclarationAttributeBase | ||
/// Overrides name | ||
/// </summary> | ||
protected TsDeclarationAttributeBase() | ||
{ | ||
IncludeNamespace = true; | ||
} | ||
public virtual string Name { get; set; } | ||
} | ||
} | ||
} |
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
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,26 @@ | ||
using System; | ||
|
||
namespace Reinforced.Typings.Attributes | ||
{ | ||
/// <summary> | ||
/// Specifies file where to put generated code for type. | ||
/// This attribute is being ignored when RtDivideTypesAmongFiles is false. | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Enum)] | ||
public class TsFile : Attribute | ||
{ | ||
/// <summary> | ||
/// Constructs new TsFile attribute | ||
/// </summary> | ||
/// <param name="fileName">File name (related to RtTargetDirectory) where to put generated code</param> | ||
public TsFile(string fileName) | ||
{ | ||
FileName = fileName; | ||
} | ||
|
||
/// <summary> | ||
/// File name (related to RtTargetDirectory) where to put generated code | ||
/// </summary> | ||
public string FileName { get; set; } | ||
} | ||
} |
Oops, something went wrong.