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
File exists - D:/Websites/public.mikeobrien.net | |
C:/Program Files (x86)/Cruise Agent/pipelines/WCFRestContrib/release/rakefile.rb:41:in `block in <top (required)>' |
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
require "albacore" | |
require "rubygems" | |
require "rake/gempackagetask" | |
ReleasePath = "D:/Websites/public.mikeobrien.net/wwwroot/Releases/WcfRestContrib/#{ENV['GO_PIPELINE_LABEL']}" | |
task :default => [:build] | |
desc "Generate assembly info." | |
assemblyinfo :assemblyInfo do |asm| |
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 Program | |
{ | |
public static void Main(string[] args) | |
{ | |
// ... | |
var loadmailConfig = RunnerConfigurator.New(x => | |
{ | |
x.ConfigureService<TimerController>(s => | |
{ |
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 GuidCombGenerator : IIdentifierGenerator | |
{ | |
// Methods | |
public object Generate(ISessionImplementor session, object obj) | |
{ | |
return this.GenerateComb(); | |
} | |
private Guid GenerateComb() | |
{ |
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
[CompilationMapping(SourceConstructFlags.Module)] | |
public static class Photon | |
{ | |
public static double EnergyByFrequency(double nu, double multiplier) | |
{ | |
return (h * (nu * multiplier)); | |
} | |
[CompilationArgumentCounts(new int[] { 1, 1 })] | |
public static double EnergyByWavelength(double lambda, double multiplier) |
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
module Photon | |
[<Measure>] | |
type m // meter | |
[<Measure>] | |
type s // second | |
[<Measure>] | |
type J // Joule |
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
namespace Math | |
type IPhoton = | |
abstract EnergyByWavelength : float -> float -> float | |
abstract EnergyByFrequency : (float * float) -> float | |
// ----------------------------------^ Specifying tupled params | |
type Photon = | |
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
[Serializable, CompilationMapping(SourceConstructFlags.ObjectType)] | |
public interface IPhoton | |
{ | |
double EnergyByFrequency(Tuple<double, double>); | |
[CompilationArgumentCounts(new int[] { 1, 1 })] | |
double EnergyByWavelength(double, double); | |
} |
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 interface IMailService | |
{ | |
void Send(string sender, string recipient, string subject, string body); | |
} | |
public class MessageEntity | |
{ | |
//... | |
public void SendThrough(IMailService mailService) | |
{ |
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
private static IEnumerable<UnionVisitor<TQuerySource>.UnionExpression> GetUnionExpressions(UnionVisitor<TQuerySource>.UnionExpression expression) | |
{ | |
Func<UnionVisitor<TQuerySource>.UnionExpression, IEnumerable<UnionVisitor<TQuerySource>.UnionExpression>> getExpressions = x => | |
{ | |
var unionVisitor = new UnionVisitor<TQuerySource>(); | |
unionVisitor.Visit(x.Expression); | |
return unionVisitor.Expressions; | |
}; | |
return GetUnionExpressions(getExpressions(expression), getExpressions); | |
} |