Beispiel #1
0
 internal static ICodeBlock Interface(this ICodeBlock pCodeBlock, string pName,
                                      bool Public            = false,
                                      bool Private           = false,
                                      bool Protected         = false,
                                      bool Internal          = false,
                                      bool ProtectedInternal = false,
                                      bool Static            = false,
                                      bool Partial           = false,
                                      bool Abstract          = false,
                                      bool Sealed            = false)
 {
     return(pCodeBlock.Interface(
                StringHelper.Modifiers(
                    Public: Public,
                    Private: Private,
                    Protected: Protected,
                    Internal: Internal,
                    ProtectedInternal: ProtectedInternal,
                    Static: Static,
                    Partial: Partial,
                    Abstract: Abstract,
                    Sealed: Sealed
                    )
                , pName,
                ""));
 }
Beispiel #2
0
        internal string GenerateInterfaceCodeFor(BehaviorSave behavior)
        {
            CodeBlockBase fileLevel      = new CodeBlockBase(null);
            ICodeBlock    namespaceLevel = fileLevel.Namespace(GueDerivingClassCodeGenerator.GueRuntimeNamespace);

            StateCodeGenerator.Self.GenerateStateEnums(behavior, namespaceLevel, enumNamePrefix: behavior.Name);


            ICodeBlock interfaceLevel = namespaceLevel.Interface("public", $"I{behavior.Name}", "");


            GenerateInterface(interfaceLevel, behavior);

            return(fileLevel.ToString());
        }