protected virtual string GetMoleculeClassName(MoleculeSymbol molecule, ISymbol relativeTo = null)
 {
     return GetRelativeName(molecule.FullName, relativeTo != null ? relativeTo.FullName : null);
 }
        protected virtual string GetPrivateTypeString(TypeReference reference, ISymbol relativeTo = null)
        {
            var type = reference.Type;
            var cardinality = reference.Cardinality;

            var builtInType = type as BuiltInType;
            if (builtInType != null && builtInType.Type == typeof(void))
                return "void";

            var fullName = GetRelativeName(type.FullName, relativeTo != null ? relativeTo.FullName : null);

            if (cardinality.CanBeMoreThanOne())
                return string.Format("{0}[]", fullName);

            if (cardinality.IsZeroOrOne() &&
                ((type is ExternalEnumSymbol) ||
                (type is ExternalType && ((ExternalType)type).Type.IsValueType)))
                return string.Format("{0}?", fullName);

            return fullName;
        }
 protected virtual Maybe<string> GetBaseClassName(MoleculeSymbol molecule, ISymbol relativeTo = null)
 {
     return molecule.Base.Select(x => GetMoleculeClassName(x, relativeTo));
 }