Boo.Lang.ResourceManager.Format C# (CSharp) Method

Format() public static method

public static Format ( string name ) : string
name string
return string
        public static string Format(string name, params object[] args)
        {
            return string.Format(GetString(name), args);
        }

Same methods

ResourceManager::Format ( string name, object param ) : string

Usage Example

Example #1
0
        public override void Apply(Boo.Lang.Ast.Node node)
        {
            ParameterDeclaration pd = node as ParameterDeclaration;

            if (null == pd)
            {
                throw new ApplicationException(ResourceManager.Format("InvalidNodeForAttribute", "ParameterDeclaration"));
            }

            // raise ArgumentNullException("<pd.Name>") unless <pd.Name>
            MethodInvocationExpression x = new MethodInvocationExpression();

            x.Target = new ReferenceExpression("ArgumentNullException");
            x.Arguments.Add(new StringLiteralExpression(pd.Name));
            RaiseStatement rs = new RaiseStatement(x);

            rs.Modifier = new StatementModifier(
                StatementModifierType.Unless,
                new ReferenceExpression(pd.Name)
                );

            // associa mensagens de erro com a posio
            // do parmetro no cdigo fonte
            rs.LexicalInfo = LexicalInfo;

            Method method = (Method)pd.ParentNode;

            method.Body.Statements.Insert(0, rs);
        }
All Usage Examples Of Boo.Lang.ResourceManager::Format