This file contains hidden or 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
public class Story | |
{ | |
public long Id { get; set; } | |
public string Description { get; set; } | |
public string Title { get; set; } | |
public StoryStatus Status { get; set; } | |
public long CreatedBy { get; set; } | |
public DateTime CreatedOn { get; set; } | |
public DateTime LastEditedOn { get; set; } | |
public long ProjectId { get; set; } |
This file contains hidden or 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
//Inserting a story | |
var database = Database.OpenConnection(m_connectionString); | |
var result = database.Stories.Insert(entity); //This doesn’t save the Project or Tasks associated with the story. The result being return is the saved object with an updated Id. | |
//updating | |
var inserted = database.Stories.Update(entity); | |
//sample update all | |
database.Stories.UpdateAll(Title: "Glorious"); | |
database.Stories.UpdateAll(database.Stories.Estimate > 10, Title: “Break me down into multiple smaller stories"); |
This file contains hidden or 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
def readVersion(filepath="AssemblyInfo.cs") | |
File.open(filepath).each_line{ |line| | |
if line.start_with?("[assembly: AssemblyVersion(\"") | |
return line.gsub("[assembly: AssemblyVersion(\"", "").gsub("\")]","").gsub(/\s+/, "") | |
end | |
} | |
end |
This file contains hidden or 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
public class UploadServceClient | |
{ | |
RestClient RestClient; | |
public UploadServceClient() | |
{ | |
RestClient = new RestClient("http://localhost/MyService"); | |
} | |
This file contains hidden or 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
//a class wrapping the actual dynamic object | |
public class Database | |
{ | |
public static dynamic Open() | |
{ | |
return new DynamicDatatbase(); | |
} | |
public static dynamic Open(string connectionString, string providerName) | |
{ |
This file contains hidden or 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
public class DynamicQueryBuilder : DynamicObject | |
{ | |
private readonly string m_tableName; | |
private string internalQuery; | |
public DynamicQueryBuilder(string tableName) | |
{ | |
m_tableName = tableName; | |
} |
This file contains hidden or 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
public class DynamicTable : DynamicObject | |
{ | |
private readonly DataTable m_dataTable; | |
public DynamicTable(DataTable dataTable) | |
{ | |
m_dataTable = dataTable; | |
} | |
public override bool TryGetIndex(GetIndexBinder binder, object[] indexes, out object result) |
This file contains hidden or 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
class Person | |
{ | |
public int Id { get; set; } | |
public int Age { get; set; } | |
public string Name { get; set; } | |
public Person() | |
{ | |
} |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" | |
android:orientation="vertical"> | |
<ImageView | |
android:id="@+id/image" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" /> | |
<LinearLayout |
This file contains hidden or 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
[Activity(Label = "Detail")] | |
public class DetailActivity : Activity | |
{ | |
private FakeFashionImageThumbnail m_fakeFashionImageDetail; | |
protected override void OnCreate(Bundle bundle) | |
{ | |
base.OnCreate(bundle); | |
SetContentView(Resource.Layout.Detail); | |
var tabHost = FindViewById<TabHost>(Resource.Id.detailTabhost); |