Пример #1
0
		private static dynamic Compile(CodeActionDefinition codeActionDefinition)
		{
			object variable;
			if (!CodeActionsCompiller.CompillationEnable)
			{
				return new { Success = false, Message = "Code actions compillation disabled." };
			}
			codeActionDefinition = codeActionDefinition.Decode();
			try
			{
				List<CodeActionDefinition> codeActionDefinitions = new List<CodeActionDefinition>()
				{
					codeActionDefinition
				};
				Guid guid = Guid.NewGuid();
				CodeActionsCompiller.CompileCodeActions(codeActionDefinitions, string.Format("TestCompile_{0}", guid.ToString("N")));
				return new { Success = true };
			}
			catch (Exception exception1)
			{
				Exception exception = exception1;
				variable = new { Success = false, Message = exception.Message.Replace("\n", "<br/>") };
			}
			return variable;
		}