public RAMLDocGeneratorV08(IApiDescriptionGroupCollectionProvider apiDescription, IParameterConverter parameterConverter, IMethodConverter methodConverter, IComments comments) { this.apiDescription = apiDescription; this.parameterConverter = parameterConverter; this.methodConverter = methodConverter; this.comments = comments; }
public virtual void TranslateComments(IComments comments) { List <IComment> nonDocCom = new List <IComment>(); List <IDocumentationComment> docCom = new List <IDocumentationComment>(); foreach (IComment ic in comments) { if (ic is IDocumentationComment) { docCom.Add((IDocumentationComment)ic); } else { nonDocCom.Add(ic); } } nonDocCom.AddRange(docCom.ToArray()); docCom.Clear(); docCom = null; foreach (IComment icom in docCom) { TranslateComment(icom); } }
/// <summary> /// Get comment /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='commentHandle'> /// Comment handle /// </param> /// <param name='authorization'> /// Format is: "Scheme CredentialsList". Possible values are: /// /// - Anon AK=AppKey /// /// - SocialPlus TK=SessionToken /// /// - Facebook AK=AppKey|TK=AccessToken /// /// - Google AK=AppKey|TK=AccessToken /// /// - Twitter AK=AppKey|RT=RequestToken|TK=AccessToken /// /// - Microsoft AK=AppKey|TK=AccessToken /// /// - AADS2S AK=AppKey|[UH=UserHandle]|TK=AADToken /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CommentView> GetCommentAsync(this IComments operations, string commentHandle, string authorization, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetCommentWithHttpMessagesAsync(commentHandle, authorization, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
public Comments_Clean(IComments comments) { _Comments = comments ?? new Comments(); _Comments.Comment = _Comments.Comment ?? string.Empty; ((IComments)this).CopyFrom(comments); }
internal void Init(IComments view, bool IsPostBack) { _view = view; //if (_webContext.CurrentUser != null) // _view.ShowViewComment(true); //else // _view.ShowViewComment(false); }
public static void CopyFrom(this IComments to, IComments from) { to.Comment = from.Comment; to.CUnique = from.CUnique; to.FileNo = from.FileNo; to.LineNo = from.LineNo; to.RecordNo = from.RecordNo; }
public NewsController() { artSer = new NewsService(); arrticles = new ArticleService(); artgamesSer = new ServiceGames(); commSer = new comenttService(); users = new UserService(); }
public WorksController(IGenres serv, IWorks serv1, IUsers serv2, IComments serv3, IRatings serv4) { commentServ = serv3; userServ = serv2; workServ = serv1; genreServ = serv; ratingServ = serv4; }
public GameController() { artSer = new ServiceGames(); commSer = new comenttService(); users = new UserService(); arrticles = new ArticleService(); newws = new NewsService(); rate = new ratingService(); }
public ParameterConverterV10(IComments comments) : base() { var date = "datetime"; typeMap[typeof(DateTime).FullName] = date; typeMap[typeof(DateTime?).FullName] = date; typeMap.Add(typeof(object).FullName, "object"); this.comments = comments; }
private void OnSaveFile() { _id3v2.Artist = Artist; _id3v2.Title = Title; _id3v2.Album = Album; _id3v2.Genre = Genre; _id3v2.Year = Year; _id3v2.TrackNumber = Track; _id3v2.Header.TagVersion = ID3v2Version.Value; List <IAttachedPicture> deleteList = new List <IAttachedPicture>(_id3v2.PictureList); foreach (var picture in PictureCollection) { if (picture.AttachedPicture != null) { picture.AttachedPicture.Description = picture.Description; picture.AttachedPicture.PictureType = picture.PictureType; deleteList.Remove(picture.AttachedPicture); } else { IAttachedPicture apic = _id3v2.PictureList.AddNew(); apic.Description = picture.Description; apic.PictureType = picture.PictureType; apic.PictureData = picture.PictureBytes; } } foreach (var deletePicture in deleteList) { _id3v2.PictureList.Remove(deletePicture); } IComments comments = _id3v2.CommentsList.FirstOrDefault(); if (!string.IsNullOrWhiteSpace(Comment)) { if (comments == null) { comments = _id3v2.CommentsList.AddNew(); } comments.Value = Comment; } else { if (comments != null) { _id3v2.CommentsList.Remove(comments); } } // TODO: Multiple comments _id3v2.Save(_fullFileName); }
public static int InventoryUnique_File135(IComments record) { if (record.FileNo == 135) { return(record.RecordNo); } else { return(0); } }
public void Init(IComments view, bool IsPostBack) { _view = view; bool IsLogin = _userSession.LoggedIn; if (!IsLogin) { //TODO:Hien thong bao chua dang nhap khong the gui comment } if (_webContext.CurrentUser != null) _view.ShowCommentBox(true); else _view.ShowCommentBox(false); }
private async void LikeSetter(IComments commentItem) { if (!commentItem.Like) { var likeCount = await HttpRequest.LikeComment(commentItem.ID, LinkNews, LikeType.Like); commentItem.LikeCount = likeCount; commentItem.Like = true; } else { var likeCount = await HttpRequest.LikeComment(commentItem.ID, LinkNews, LikeType.UnLike); commentItem.LikeCount = likeCount; commentItem.Like = false; } }
public void Init(IComments view, bool IsPostBack) { _view = view; bool IsLogin = _userSession.LoggedIn; if (!IsLogin) { //TODO:Hien thong bao chua dang nhap khong the gui comment } if (_webContext.CurrentUser != null) { _view.ShowCommentBox(true); } else { _view.ShowCommentBox(false); } }
public ImageController(IDatabaseRepository <UserImages> userimages, IJsonCache <UserImages> cacheimage, IDatabaseRepository <Vote> databasevote, IDatabaseRepository <Comments> databasecomment, IDatabaseRepository <Category> categoryrepository, IJsonCache <Category> categorycache, IVote updatevote, IUserImages user, IComments comments) { this.userimages = userimages; this.cacheimage = cacheimage; this.databasevote = databasevote; this.updatevote = updatevote; this.comments = comments; this.databasecomment = databasecomment; this.categoryrepository = categoryrepository; this.categorycache = categorycache; this.user = user; }
public CommentsModule(IBarCodes barCodes, IComments comments, IUsers users, IEventLog eventLog, IGravatarService gravatarService) : base("/Comment") { this.RequiresAuthentication(); this.barCodes = barCodes; this.comments = comments; this.users = users; this.eventLog = eventLog; this.gravatarService = gravatarService; Get["/{id}"] = x => { if (!this.barCodes.Exists(x.id)) { return(Response.AsJson(Enumerable.Empty <Comment>())); } IEnumerable <Comment> commentsForBarCode = this.comments.GetCommentsForBarCode(x.id); Comment[] ret = this.gravatarService.AddAvatarToComments(commentsForBarCode).ToArray(); return(Response.AsJson(ret)); }; Post["/{id}"] = x => { if (!this.barCodes.Exists(x.id)) { return(Response.AsJson(Enumerable.Empty <Comment>())); } Comment comment = this.Bind <Comment>(); comment.Author = this.users.GetIdByUsername(this.Context.CurrentUser.UserName); this.comments.Add(comment); Comment[] commentsForBarCode = this.comments.GetCommentsForBarCode(x.id).ToArray(); this.Log(x.id, comment.Author, "COMMENT", comment.Text); return(Response.AsJson(commentsForBarCode)); }; }
public static bool LoadFromReader_Ext(this IComments comments, OdbcDataReader reader) { bool loadSucceeded; try { // example for how to trap nulls by extending the types. See OdbcDataReaderExtensions //altSuply./*EndDate*/ = (DateTime)(reader["EndDate"]).CDbNull(new DateTime(1000, 1, 1)); comments.CUnique = (Int32)reader["CUnique"]; comments.Comment = (string)reader["Comment"]; comments.FileNo = (Int16)reader["FileNo"]; comments.LineNo = (Int16)reader["LineNo"]; comments.RecordNo = (Int32)reader["RecordNo"]; loadSucceeded = true; } catch { loadSucceeded = false; } return(loadSucceeded); }
public CommentsModule(IBarCodes barCodes, IComments comments, IUsers users, IEventLog eventLog, IGravatarService gravatarService) : base("/Comment") { this.RequiresAuthentication(); this.barCodes = barCodes; this.comments = comments; this.users = users; this.eventLog = eventLog; this.gravatarService = gravatarService; Get["/{id}"] = x => { if (!this.barCodes.Exists(x.id)) return Response.AsJson(Enumerable.Empty<Comment>()); IEnumerable<Comment> commentsForBarCode = this.comments.GetCommentsForBarCode(x.id); Comment[] ret = this.gravatarService.AddAvatarToComments(commentsForBarCode).ToArray(); return Response.AsJson(ret); }; Post["/{id}"] = x => { if (!this.barCodes.Exists(x.id)) return Response.AsJson(Enumerable.Empty<Comment>()); Comment comment = this.Bind<Comment>(); comment.Author = this.users.GetIdByUsername(this.Context.CurrentUser.UserName); this.comments.Add(comment); Comment[] commentsForBarCode = this.comments.GetCommentsForBarCode(x.id).ToArray(); this.Log(x.id, comment.Author, "COMMENT", comment.Text); return Response.AsJson(commentsForBarCode); }; }
public MethodConverterV10(IParameterConverter parameterConverter, IComments comments) : base(parameterConverter, comments) { }
public CommentsController(ApplicationDbContext context, IMapper mapper) { _commentsDomain = new CommentsRepository(context, mapper); }
public CommentsBLL() : base(typeName) { iComments = (IComments)idal; }
/// <summary> /// Get comment /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='commentHandle'> /// Comment handle /// </param> /// <param name='authorization'> /// Format is: "Scheme CredentialsList". Possible values are: /// /// - Anon AK=AppKey /// /// - SocialPlus TK=SessionToken /// /// - Facebook AK=AppKey|TK=AccessToken /// /// - Google AK=AppKey|TK=AccessToken /// /// - Twitter AK=AppKey|RT=RequestToken|TK=AccessToken /// /// - Microsoft AK=AppKey|TK=AccessToken /// /// - AADS2S AK=AppKey|[UH=UserHandle]|TK=AADToken /// </param> public static CommentView GetComment(this IComments operations, string commentHandle, string authorization) { return(Task.Factory.StartNew(s => ((IComments)s).GetCommentAsync(commentHandle, authorization), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
public MethodConverterV08(IParameterConverter parameterConverter, IComments comments) { this.parameterConverter = parameterConverter; this.comments = comments; }
public CommentController() { commSer = new comenttService(); }
public static bool LoadFromReader(this IComments comments, OdbcDataReader reader) { return(comments.LoadFromReader_Ext(reader)); }
public CommentsController(IComments comments, ILogger <CommentsController> logger) { this.comments = comments; this.logger = logger; }
public Comments() { dal = DataAccess.CreateComments(); }
public ComntsViewComponent(IComments comnt, ApplicationDbContext db) { this.comnt = comnt; this.db = db; }
public RAMLDocGeneratorV10(IApiDescriptionGroupCollectionProvider apiDescription, IParameterConverter parameterConverter, IMethodConverter methodConverter, IComments comments) : base(apiDescription, parameterConverter, methodConverter, comments) { }
public CommentsController(IComments context) { _context = context; }
public CommentaryController(IComments comments) { this.comments = comments; }