コード例 #1
0
        // Creating new class to version controll system
        private void CreateNewClassToVersionControl(Type type)
        {
            ControlledClass newClass = new ControlledClass();

            newClass.name = type.Name;

            db.ControlledClasses.Add(newClass);

            var version = GetLastestVersionByType(type);

            AddVersionToClass(version, newClass, null);
        }
コード例 #2
0
        // Creating new version of controlled class
        private void AddVersionToClass(Model.Version version, ControlledClass controlledClass, Model.Version previousVersion)
        {
            version.controlledClass = controlledClass;

            version.classBody = GetClassBody(version.realCLassFileName);

            version.previousVersion = previousVersion;

            db.Versions.Add(version);
        }