예제 #1
0
        static void Main(string[] args)
        {
            var user = new ApiUser { Name = Environment.MachineName };
            var tokenStore = new SqliteTokenStore();

            var api = new Applications.Public.Core(tokenStore, user)
            {
                UserAgent = "Xero Api - Creating example"
            };

            var creator = new Creator.Creator();
            new ApiDataCreation(api).Create(10, 10,
                creator.People(5),
                creator.Addresses(5),
                creator.Descriptions(5));
        }
예제 #2
0
        static void Main(string[] args)
        {
            var user = new ApiUser { Name = Environment.MachineName }; // ApiUser is used when retrieving tokens from the token store - See TokenStoreAuthenticator GetToken(IConsumer consumer, IUser user). This is primarily for Partner Applications
            var tokenStore = new SqliteTokenStore();

            var api = new Applications.Public.Core(tokenStore, user)
            {
                UserAgent = "Xero Api - Creating example"
            };

            var creator = new Creator.Creator();
            new ApiDataCreation(api).Create(10, 10,
                creator.People(5),
                creator.Addresses(5),
                creator.Descriptions(5));
        }
예제 #3
0
파일: Program.cs 프로젝트: sv-dev1/Xero
        static void Main(string[] args)
        {
            var user = new ApiUser {
                Name = Environment.MachineName
            };                                                         // ApiUser is used when retrieving tokens from the token store - See TokenStoreAuthenticator GetToken(IConsumer consumer, IUser user). This is primarily for Partner Applications
            var tokenStore = new SqliteTokenStore();

            var api = new Applications.Public.Core(tokenStore, user)
            {
                UserAgent = "Xero Api - Creating example"
            };

            var creator = new Creator.Creator();

            new ApiDataCreation(api).Create(10, 10,
                                            creator.People(5),
                                            creator.Addresses(5),
                                            creator.Descriptions(5));
        }
예제 #4
0
        static void Main(string[] args)
        {
            var user = new ApiUser {
                Name = Environment.MachineName
            };
            var tokenStore = new SqliteTokenStore();

            var api = new Applications.Public.Core(tokenStore, user)
            {
                UserAgent = "Xero Api - Creating example"
            };

            var creator = new Creator.Creator();

            new ApiDataCreation(api).Create(10, 10,
                                            creator.People(5),
                                            creator.Addresses(5),
                                            creator.Descriptions(5));
        }