BeginLoad() private method

private BeginLoad ( ) : void
return void
Esempio n. 1
0
        public static DubProject ReadPackageInformation(FilePath packageJsonPath, JsonReader r, IProgressMonitor monitor)
        {
            var defaultPackage = new DubProject();

            defaultPackage.FileName      = packageJsonPath;
            defaultPackage.BaseDirectory = packageJsonPath.ParentDirectory;

            defaultPackage.BeginLoad();

            defaultPackage.AddProjectAndSolutionConfiguration(new DubProjectConfiguration {
                Name = GettextCatalog.GetString("Default"), Id = DubProjectConfiguration.DefaultConfigId
            });

            while (r.Read())
            {
                if (r.TokenType == JsonToken.PropertyName)
                {
                    var propName = r.Value as string;
                    defaultPackage.TryPopulateProperty(propName, r, monitor);
                }
                else if (r.TokenType == JsonToken.EndObject)
                {
                    break;
                }
            }

            defaultPackage.Items.Add(new ProjectFile(packageJsonPath, BuildAction.None));

            defaultPackage.EndLoad();
            return(defaultPackage);
        }
Esempio n. 2
0
        public static DubProject ReadPackageInformation(FilePath packageJsonPath,JsonReader r, IProgressMonitor monitor)
        {
            var defaultPackage = new DubProject();
            defaultPackage.FileName = packageJsonPath;
            defaultPackage.BaseDirectory = packageJsonPath.ParentDirectory;

            defaultPackage.BeginLoad ();

            defaultPackage.AddProjectAndSolutionConfiguration(new DubProjectConfiguration { Name = GettextCatalog.GetString("Default"), Id = DubProjectConfiguration.DefaultConfigId });

            while (r.Read ()) {
                if (r.TokenType == JsonToken.PropertyName) {
                    var propName = r.Value as string;
                    defaultPackage.TryPopulateProperty (propName, r, monitor);
                }
                else if (r.TokenType == JsonToken.EndObject)
                    break;
            }

            defaultPackage.Items.Add(new ProjectFile(packageJsonPath, BuildAction.None));

            defaultPackage.EndLoad ();
            return defaultPackage;
        }