donieardianto / google-api-dotnet-client

Automatically exported from code.google.com/p/google-api-dotnet-client
0 stars 0 forks source link

Initialize sub-resources in generated code #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Where resources have resources the sub-resources never get constructed.

e.g. DiacritizeService will not work the corpus member is never Initialized.

public class Diacritize {
        private Google.Apis.Discovery.ISchemaAwareRequestExecutor service;
        private const string Resource = "diacritize";
        private log4net.ILog logger = log4net.LogManager.GetLogger(typeof(Diacritize));
        private Corpus corpus;
        public Diacritize(DiacritizeService service) {
            this.service = service;
        }
        public virtual Corpus Corpus {
            get {
                return this.corpus;
            }
        }
    }

Constructor should be creating Corpus

public Diacritize(DiacritizeService service) 
{
      this.service = service;
      this.corpus = new Corpus(service);
}

Original issue reported on code.google.com by davidwat...@google.com on 23 May 2011 at 4:46

GoogleCodeExporter commented 9 years ago

Original comment by davidwat...@google.com on 1 Jun 2011 at 8:53

GoogleCodeExporter commented 9 years ago

Original comment by mlin...@google.com on 1 Jun 2011 at 3:10

GoogleCodeExporter commented 9 years ago

Original comment by mlin...@google.com on 7 Jun 2011 at 9:36