Skip to content

Instantly share code, notes, and snippets.

View cyberzed's full-sized avatar

Stefan Daugaard Poulsen cyberzed

View GitHub Profile
The term 'C:\tools\poshgit\dahlbyk-posh-git-60be436\profile.example.ps1' is not recognized as the name of a cmdlet, function, script file, or op
erable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\sdap\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:3 char:2
+ . <<<< 'C:\tools\poshgit\dahlbyk-posh-git-60be436\profile.example.ps1'
+ CategoryInfo : ObjectNotFound: (C:\tools\poshgi...ile.example.ps1:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
public class ICC
{
public ICC(string number)
{
Number = number;
}
public string Number { get; private set; }
}
public class MyClass : NotificationObject
{
private string myProperty = string.Empty;
public string MyProperty
{
get{ return myProperty; }
set{
myProperty = value;
RaisePropertyChanged( ()=> MyProperty );
@cyberzed
cyberzed / ServiceClient.cs
Created February 15, 2012 19:59
Rx powered ServiceStack SL Client
public class ServiceClient<TRequest, TResponse>
where TRequest : class
where TResponse : class
{
private readonly string _baseUri;
private ISubject<TResponse> completionChannel;
public ServiceClient(string baseUri = "/api")
{
// make sure the base uri is set appropriately
@cyberzed
cyberzed / BaseMessage.cs
Created January 9, 2012 22:30
Message abstraction
public abstract class BaseMessage
{
protected string Source;
protected string Destination;
protected string Content;
protected BaseMessage(string source, string destination, string content)
{
Source = source;
Destination = destination;
var observable = Enumerable.Range(0, 10).ToObservable();
observable.Subscribe(Console.WriteLine, () => Console.WriteLine("Complete"));
@cyberzed
cyberzed / Controls.xaml
Created January 4, 2012 20:58
Could do but...
<ControlTemplate TargetType="TabItem">
<Grid x:Name="root"
Margin="0,0,15,0">
<ContentControl Content="{TemplateBinding Header}" FontSize="26.667">
<ContentControl.Foreground>
<SolidColorBrush Color="{DynamicResource Gray11}" />
</ContentControl.Foreground>
</ContentControl>
</Grid>
</ControlTemplate>