private CodeContractStatement(ICSharpStatement statement, IInvocationExpression invocationExpression, CodeContractStatementType statementType) : base(statement) { Contract.Requires(invocationExpression != null); _invocationExpression = invocationExpression; _statementType = statementType; // Due to weird bug in CC compiler, I can't use the same variable in Contract.Requires // and in lambda expression. _codeContractExpression = JetBrains.Util.Lazy.Lazy.Of( () => Assertions.ContractStatementFactory.TryCreateAssertion(_invocationExpression)); }
public Agent(Lifetime lifetime, AgentManager agentManager) { character = JetBrains.Util.Lazy.Lazy.Of(() => { agentManager.Initialise(); var agentCharacter = agentManager.GetAgent("Clippit"); agentCharacter.AgentClicked.FlowInto(lifetime, AgentClicked); agentCharacter.ButtonClicked.FlowInto(lifetime, ButtonClicked); agentCharacter.BalloonOptionClicked.FlowInto(lifetime, BalloonOptionClicked); lifetime.AddAction(() => agentManager.UnloadAgent(agentCharacter)); return(agentCharacter); }); AgentClicked = new SimpleSignal(lifetime, "Agent::AgentClicked"); ButtonClicked = new Signal <string>(lifetime, "Agent::ButtonClicked"); BalloonOptionClicked = new Signal <object>(lifetime, "Agent::BalloonOptionClicked"); }
public CreatePsiRuleItem(JetBrains.Util.Lazy.Lazy <CreateNTriplesPrefixContext> context, string format) : base(context) { this.myFormatText = format; }
public CreatePsiRuleItem(JetBrains.Util.Lazy.Lazy <CreatePsiRuleContext> context, string format) : base(context) { myFormatText = format; }