public IDevHandledInstruction CreateDevHandledInstruction(IDevInstructions <IDevHandledInstruction> devInstruction)
        {
            DevHandledInstruction = new DevHandledInstruction();

            DevHandledInstruction.FileContent += (devInstruction.AccessModifier + " " + devInstruction.EntityType + " " + devInstruction.Name + "{}");
            DevHandledInstruction.FileName     = devInstruction.Name;

            return(DevHandledInstruction);
        }
Exemplo n.º 2
0
        protected virtual void Parse(string input)
        {
            Parser <ITarget, ISource, IResult> parser = new Parser <ITarget, ISource, IResult>();

            result = parser.Parse(null, new Source {
                StringSource = input
            });

            IDeveloperCommandDriver dcDriver    = new DeveloperCommandDriver();
            IDevHandledInstruction  instruction = dcDriver.CreateDevHandledInstruction(dcDriver.CommandDriver(result));

            IProjectItem projItem = new ProjectItem
            {
                Content     = instruction.FileContent,
                FilePath    = @"..\..\..\..\Toci.Piastcode.Social.Entities.Interfaces\Toci.Tests\" + instruction.FileName + ".cs",
                ProjectPath = @"..\..\..\..\Toci.Piastcode.Social.Entities.Interfaces\Toci.Tests\Toci.Piastcode.Tests.csproj",
            };

            projItem.ItemModificationType = ModificationType.Add;

            fileManager.AddNewFile(projItem);

            scManager.BroadCastFile(projItem);
        }