Last active
September 8, 2015 16:04
-
-
Save oinant/6588e8d5d11fa4bd38cf to your computer and use it in GitHub Desktop.
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
using System; | |
namespace Builder | |
{ | |
public class MyClass | |
{ | |
private readonly string _aStringProperty; | |
private readonly bool _aGivenFlag; | |
private readonly bool _anotherFlag; | |
public MyClass(string aStringProperty, bool aGivenFlag, bool anotherFlag) | |
{ | |
_aStringProperty = aStringProperty; | |
_aGivenFlag = aGivenFlag; | |
_anotherFlag = anotherFlag; | |
} | |
public object DoSomeBehavior() | |
{ | |
dynamic @object = null; | |
@object.actionAt = DateTime.UtcNow; | |
@object.theName = _aStringProperty; | |
if (_aGivenFlag) | |
@object.theName = "the property : " + @object.theName; | |
if (_anotherFlag) | |
@object.theName = @object.theName.ToLower(); | |
return @object; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment