示例#1
0
        public static async Task <APIGateway> Create(string path, PrivateIdentity self, int port)
        {
            var conn = new SQLiteAsyncConnection(path, SQLiteOpenFlags.ReadWrite | SQLiteOpenFlags.Create | SQLiteOpenFlags.FullMutex);

            var users = await UserHandler.Create(conn, self.ID);

            var images = await ImageHandler.Create(conn, users);

            var posts = await PostHandler.Create(conn, users);

            var profiles = await ProfileHandler.Create(conn, users);

            var addresses = await AddressHandler.Create(conn, users, port, self);

            return(new APIGateway(users, images, posts, profiles, addresses));
        }