Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var connectionString = ConfigurationManager.ConnectionStrings["System.Data.SqlClient"].ConnectionString;
            var factory          = new SharpFactory(SqlClientFactory.Instance, connectionString);
            var consoleRunner    = new ConsoleRunner(factory.CreateDataClient(), Assembly.GetExecutingAssembly(), "Chinnok");

            consoleRunner.Start();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            SharpDataLogging.LoggerFactory = new LoggerFactory().AddConsole(LogLevel.Debug);

            var factory = new SharpFactory(SqlClientFactory.Instance, "Data Source=(localdb)\\MSSQLLocalDB; Initial Catalog=sharp; Integrated Security=True; Encrypt=False; TrustServerCertificate=True; ApplicationIntent=ReadWrite;");

            using (var client = factory.CreateDataClient()) {
                new Example().Start(client);
            }
            Console.WriteLine("Done");
            Console.ReadLine();
        }
Ejemplo n.º 3
0
        private static bool validateCSharpMonoBehaviour()
        {
            if (!SharpFactorySettings.IsAvailable)
            {
                return(false);
            }

            if (SharpFactory.findTemplate(TemplateType.MonoBehaviour) == null)
            {
                return(false);
            }

            return(true);
        }
Ejemplo n.º 4
0
        private static void createCSharpMonoBehaviour()
        {
            Debug.Log("Create C# MonoBehaviour");

            TemplateFile template = SharpFactory.findTemplate(TemplateType.MonoBehaviour);

            if (template == null)
            {
                return;
            }

            CreateSharpFileAction endNameEditAction = ScriptableObject.CreateInstance <CreateSharpFileAction>();

            endNameEditAction.scriptIcon = EditorIcons.CSharpBehaviourIcon;

            ProjectWindowUtil.StartNameEditingIfProjectWindowExists(
                0,
                endNameEditAction,
                "NewMonoBehaviour.cs",
                EditorIcons.CSharpBehaviourIcon,
                template.getTemplatePath()
                );
        }