/// <inheritdoc /> protected override AmbientNamespaceDefinition?GetNamespaceDefinition() { var members = new List <NamespaceFunctionDefinition>(); foreach (SealSourceDirectoryOption kind in Enum.GetValues(typeof(SealSourceDirectoryOption))) { var memberName = ToCamelCase(kind.ToString()); members.Add(Function(memberName, ModuleBinding.CreateEnum(Symbol(memberName), (int)kind))); } return(new AmbientNamespaceDefinition( "Transformer." + typeof(SealSourceDirectoryOption).Name, members.ToArray())); }
/// <inheritdoc /> protected override AmbientNamespaceDefinition?GetNamespaceDefinition() { var members = new List <NamespaceFunctionDefinition>(); foreach (NameResolutionSemantics semantics in Enum.GetValues(typeof(NameResolutionSemantics))) { var memberName = ToCamelCase(semantics.ToString()); members.Add(Function(memberName, ModuleBinding.CreateEnum(Symbol(memberName), (int)semantics))); } return(new AmbientNamespaceDefinition( typeof(NameResolutionSemantics).Name, members.ToArray())); }
/// <inheritdoc /> protected override AmbientNamespaceDefinition?GetNamespaceDefinition() { var members = new List <NamespaceFunctionDefinition>(); Type containerIsolationLevelType = typeof(ContainerIsolationLevel); foreach (string isolationLevelName in Enum.GetNames(containerIsolationLevelType)) { var value = Enum.Parse(containerIsolationLevelType, isolationLevelName); var memberName = ToCamelCase(isolationLevelName); members.Add(Function(memberName, ModuleBinding.CreateEnum(Symbol(memberName), (int)value))); } return(new AmbientNamespaceDefinition( typeof(ContainerIsolationLevel).Name, members.ToArray())); }
/// <inheritdoc /> protected override AmbientNamespaceDefinition?GetNamespaceDefinition() { var members = new List <NamespaceFunctionDefinition>(); foreach (ArtifactKind kind in Enum.GetValues(typeof(ArtifactKind))) { // Undefined is an artificial value. if (kind != ArtifactKind.Undefined) { var memberName = ToCamelCase(kind.ToString()); members.Add(Function(memberName, ModuleBinding.CreateEnum(Symbol(memberName), (int)kind))); } } return(new AmbientNamespaceDefinition( typeof(ArtifactKind).Name, members.ToArray())); }
/// <summary> /// Factory method that creates instance of the <see cref="NamespaceFunctionDefinition" />. /// </summary> protected NamespaceFunctionDefinition EnumMember(string name, int value) { return(new NamespaceFunctionDefinition(name, ModuleBinding.CreateEnum(Symbol(name), value))); }