private void AddInitializer([NotNull] IFieldDeclaration fieldDeclaration, [NotNull] string initializerExpression)
        {
            var logCreateExpression = factory.CreateExpression(initializerExpression);
            var logInitializer      = factory.CreateExpressionInitializer(logCreateExpression);

            fieldDeclaration.SetInitial(logInitializer);
        }
示例#2
0
 public IVariableInitializer SetInitial(IVariableInitializer param)
 {
     return(_fieldDeclaration.SetInitial(param));
 }