Implementation work for Lite runtime and generator
diff --git a/src/ProtoGen/SourceGeneratorBase.cs b/src/ProtoGen/SourceGeneratorBase.cs
index 02f8457..5fa420f 100644
--- a/src/ProtoGen/SourceGeneratorBase.cs
+++ b/src/ProtoGen/SourceGeneratorBase.cs
@@ -40,8 +40,16 @@
 
     private readonly T descriptor;
 
+    protected readonly bool OptimizeSpeed;
+    protected readonly bool OptimizeSize;
+    protected readonly bool UseLiteRuntime;
+
     protected SourceGeneratorBase(T descriptor) {
       this.descriptor = descriptor;
+
+      OptimizeSize = descriptor.File.Options.OptimizeFor == Google.ProtocolBuffers.DescriptorProtos.FileOptions.Types.OptimizeMode.CODE_SIZE;
+      OptimizeSpeed = descriptor.File.Options.OptimizeFor == Google.ProtocolBuffers.DescriptorProtos.FileOptions.Types.OptimizeMode.SPEED;
+      UseLiteRuntime = descriptor.File.Options.OptimizeFor == Google.ProtocolBuffers.DescriptorProtos.FileOptions.Types.OptimizeMode.LITE_RUNTIME;
     }
 
     protected T Descriptor {