Exemple #1
0
        //TODO encoding for each file in patch should be obtained separately from .gitattributes
        public void LoadPatch(string text, bool applyPatch, Encoding filesContentEncoding)
        {
            PatchProcessor patchProcessor = new PatchProcessor(filesContentEncoding);

            _patches = patchProcessor.CreatePatchesFromString(text).ToList();

            if (!applyPatch)
            {
                return;
            }

            foreach (Patch patchApply in _patches)
            {
                if (patchApply.Apply)
                {
                    patchApply.ApplyPatch(filesContentEncoding);
                }
            }
        }
Exemple #2
0
        // TODO encoding for each file in patch should be obtained separately from .gitattributes
        public void LoadPatch(string text, Encoding filesContentEncoding)
        {
            PatchProcessor patchProcessor = new PatchProcessor(filesContentEncoding);

            Patches = patchProcessor.CreatePatchesFromString(text).ToList();
        }
        //TODO encoding for each file in patch should be obtained separatly from .gitattributes
        public void LoadPatch(string text, bool applyPatch, Encoding filesContentEncoding)
        {
            PatchProcessor _patchProcessor = new PatchProcessor(filesContentEncoding);

            _patches = _patchProcessor.CreatePatchesFromString(text);

            if (!applyPatch)
                return;

            foreach (Patch patchApply in _patches)
            {
                if (patchApply.Apply)
                    patchApply.ApplyPatch();
            }
        }