示例#1
0
        public static List <Album> GetAlbums(IExecuteSystem es, String owner, List <String> ids = null, UInt32?offset = null, UInt32?count = null, Boolean?needSystem = null, Boolean?needCovers = null, Boolean?photoSizes = null)
        {
            var method = new GetAlbums
            {
                OwnerId    = owner,
                AlbumIds   = ids,
                Offset     = offset,
                Count      = count,
                NeedSystem = needSystem,
                NeedCovers = needCovers,
                PhotoSizes = photoSizes
            };

            return(es.Execute(method));
        }
示例#2
0
文件: Board.cs 项目: nikitam/VkLib
        public static String AddComment(IExecuteSystem es, String groupId, String topicId, String text = null, List <String> attachments = null, Boolean?fromGroup = null, Int32?stickerId = null, String commentGuid = null)
        {
            var method = new AddComment
            {
                GroupId     = groupId,
                TopicId     = topicId,
                Text        = text,
                Attachments = attachments,
                FromGroup   = fromGroup,
                StickerId   = stickerId,
                GuidComment = commentGuid
            };

            return(es.Execute(method));
        }
示例#3
0
        public static List <Group> Get(IExecuteSystem es, String userId, Boolean?extended = true,
                                       String filter = null, List <String> fields = null, Int32?count = null, Int32?offset = null)
        {
            var method = new Get
            {
                Count    = count,
                Extended = extended,
                Fields   = fields,
                Filter   = filter,
                Offset   = offset,
                UserId   = userId
            };

            return(es.Execute(method));
        }
示例#4
0
文件: Users.cs 项目: nikitam/VkLib
        public static User Get(IExecuteSystem es, String userId, List <String> fields = null,
                               String nameCase = null)
        {
            var method = new Get
            {
                UserIds = new List <String>
                {
                    userId
                },
                Fields   = fields,
                NameCase = nameCase
            };

            return(es.Execute(method));
        }
示例#5
0
文件: Friends.cs 项目: nikitam/VkLib
        public static List <User> Get(IExecuteSystem es, String userId, String order, List <String> fields = null, List <String> lists = null,
                                      Int32?count = null, Int32?offset = null, String nameCase = null)
        {
            var method = new Get
            {
                UserId   = userId,
                Order    = order,
                Lists    = lists,
                Count    = count,
                Offset   = offset,
                Fields   = fields,
                NameCase = nameCase
            };

            return(es.Execute(method));
        }
示例#6
0
        public static List <PhotoComment> GetComments(IExecuteSystem es, String owner, String photo,
                                                      Boolean?needLikes = null, Int32?offset = null, Int32?count = null, String sort = null,
                                                      Boolean?extended  = null)
        {
            var method = new GetComments
            {
                OwnerId   = owner,
                PhotoId   = photo,
                NeedLikes = needLikes,
                Offset    = offset,
                Count     = count,
                Sort      = sort,
                Extended  = extended
            };

            return(es.Execute(method));
        }
示例#7
0
        public static Album CreateAlbum(IExecuteSystem es, String title, String groupId = null, String descr = null,
                                        String privacyView       = null, String privacyComment = null, Boolean?uploadByAdmins = null,
                                        Boolean?commentsDisabled = null)
        {
            var method = new CreateAlbum
            {
                Title            = title,
                GroupId          = groupId,
                Description      = descr,
                PrivacyView      = privacyView,
                PrivacyComment   = privacyComment,
                UploadByAdmins   = uploadByAdmins,
                CommentsDisabled = commentsDisabled
            };

            return(es.Execute(method));
        }
示例#8
0
        public static String CreateComment(IExecuteSystem es, String owner, String photo, String message,
                                           List <String> attaches = null, Boolean?fromGroup = null, String replyToComment = null,
                                           String stickerId       = null)
        {
            var method = new CreateComment
            {
                OwnerId        = owner,
                PhotoId        = photo,
                Message        = message,
                Attachments    = attaches,
                FromGroup      = fromGroup,
                ReplyToComment = replyToComment,
                StickerId      = stickerId
            };

            return(es.Execute(method));
        }
示例#9
0
        public static String Send(IExecuteSystem es, String userId, String message, String domain = null, String chatId = null, List <String> userIds = null, Guid?unique = null, Double?lat = null, Double? @long = null, List <String> attach = null)
        {
            var method = new Send
            {
                UserId     = userId,
                Domain     = domain,
                ChatId     = chatId,
                UserIds    = userIds,
                Message    = message,
                Unique     = unique,
                Lat        = lat,
                Long       = @long,
                Attachment = attach
            };

            return(es.Execute(method));
        }
示例#10
0
        public static List <Photo> Save(IExecuteSystem es, String albumId, String server, String photosList,
                                        String hash, String groupId = null, Double?latitude = null, Double?longitude = null,
                                        String caption = null)
        {
            var method = new Save()
            {
                AlbumId    = albumId,
                GroupId    = groupId,
                Server     = server,
                PhotosList = photosList,
                Hash       = hash,
                Latitude   = latitude,
                Longitude  = longitude,
                Caption    = caption
            };

            return(es.Execute(method));
        }
示例#11
0
        public static List <Photo> Get(IExecuteSystem es, String owner, String album, List <String> ids = null,
                                       Boolean?rev        = null, Boolean?extended = null, String feedType = null, DateTime?feed = null,
                                       Boolean?photoSizes = null, Int32?offset     = null, Int32?count     = null)
        {
            var method = new Get
            {
                OwnerId    = owner,
                AlbumId    = album,
                PhotoIds   = ids,
                Rev        = rev,
                Extended   = extended,
                FeedType   = feedType,
                Feed       = feed,
                PhotoSizes = photoSizes,
                Offset     = offset,
                Count      = count
            };

            return(es.Execute(method));
        }
示例#12
0
 double monitorSystemExecutionDuration(IExecuteSystem system) {
     _stopwatch.Reset();
     _stopwatch.Start();
     system.Execute();
     _stopwatch.Stop();
     return _stopwatch.Elapsed.TotalMilliseconds;
 }