-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from dills122/release100
Release100
- Loading branch information
Showing
20 changed files
with
80 additions
and
150 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,25 +1,15 @@ | ||
using ShamWow.Constants; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace ShamWow.Attributes | ||
{ | ||
class DecimalAtr : Attribute | ||
{ | ||
public DecimalType scrubType { get; private set; } | ||
|
||
public string scrubType { get; private set; } | ||
|
||
public DecimalAtr(string scrubType) | ||
public DecimalAtr(DecimalType scrubType) | ||
{ | ||
DecimalTypes type; | ||
Enum.TryParse(scrubType, out type); | ||
this.scrubType = scrubType; | ||
if (!Enum.IsDefined(typeof(DecimalTypes), scrubType)) | ||
{ | ||
//Not the best fit, but good for now | ||
throw new InvalidOperationException("Not Valid Scrub Type"); | ||
} | ||
} | ||
} | ||
} |
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
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,43 +1,25 @@ | ||
using ShamWow.Constants; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace ShamWow.Attributes | ||
{ | ||
public class StringAtr : Attribute | ||
{ | ||
public string scrubType { get; private set; } | ||
public StringType scrubType { get; private set; } | ||
public int length { get; private set; } | ||
|
||
public StringAtr(string scrubType) | ||
public StringAtr(StringType scrubType) | ||
{ | ||
if (CheckAttr(scrubType)) | ||
{ | ||
this.scrubType = scrubType; | ||
} | ||
this.scrubType = scrubType; | ||
} | ||
|
||
public StringAtr(string scrubType, int length) | ||
public StringAtr(StringType scrubType, int length) | ||
{ | ||
if (CheckAttr(scrubType) && length > 0) | ||
if (length > 0) | ||
{ | ||
this.scrubType = scrubType; | ||
this.length = length; | ||
} | ||
} | ||
|
||
private bool CheckAttr(string scrubType) | ||
{ | ||
StringTypes type; | ||
Enum.TryParse(scrubType, out type); | ||
|
||
if (!Enum.IsDefined(typeof(StringTypes), scrubType)) | ||
{ | ||
//Not the best fit, but good for now | ||
throw new InvalidOperationException("Not Valid Scrub Type"); | ||
} | ||
return true; | ||
} | ||
} | ||
} |
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
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
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
Oops, something went wrong.