示例#1
0
 /// <summary>
 /// Initializes a new instance of the EntityController class.
 /// </summary>
 /// <param name="entityService">Instance of Entity Service</param>
 /// <param name="profileService">Instance of profile Service</param>
 public EntityController(IEntityService entityService, IProfileService profileService, ICommunityService communityService,INotificationService notificationService)
     : base(profileService)
 {
     _entityService = entityService;
     _notificationService = notificationService;
     _communityService = communityService;
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the ContentController class.
 /// </summary>
 /// <param name="contentService">Instance of Content Service</param>
 /// <param name="profileService">Instance of profile Service</param>
 public ContentController(IContentService contentService, IProfileService profileService, INotificationService queueService, ICommunityService communityService)
     : base(profileService)
 {
     _contentService = contentService;
     _notificationService = queueService;
     _communityService = communityService;
 }
示例#3
0
 public MyCommunitysViewComponent(ICommunityService communityService, MemberDbContext context, ILoggerFactory loggerFactory)
 {
     _logger           = loggerFactory.CreateLogger <MyCommunitysViewComponent>();
     memberDb          = context;
     _communityService = communityService;
 }
        public SplitMasterViewModel(IUserService userService, IMvxMessenger messenger, IDialogService dialogService, IAuthenticator authService, ICommunityService communityService, IProspectService prospectService, IIncrementalCollectionFactory collectionFactory, IMvxNavigationService navigationService)
        {
            Messenger          = messenger;
            _dialogService     = dialogService;
            _authService       = authService;
            _communityService  = communityService;
            _prospectService   = prospectService;
            _collectionFactory = collectionFactory;
            _navigationService = navigationService;
            _userService       = userService;

            Messenger.Subscribe <ProspectChangedMessage>(message => ProspectUpdated(message.UpdatedProspect), MvxReference.Strong);
            Messenger.Subscribe <ProspectAssignedMessage>(message => ProspectAssigned(message.AssignedProspect), MvxReference.Strong);
            Messenger.Subscribe <ActivityAddedMessage>(message => ActivityAdded(message.AddedActivity), MvxReference.Strong);
        }
示例#5
0
 /// <summary>
 /// Initializes a new instance of the SitemapController class.
 /// </summary>
 /// <param name="communityService">Instance of community Service</param>
 /// <param name="contentService">Instance of content Service</param>
 /// <param name="profileService">Instance of profile Service</param>
 public SitemapController(ICommunityService communityService, IContentService contentService, IProfileService profileService)
     : base(profileService)
 {
     _communityService = communityService;
     _contentService = contentService;
 }
示例#6
0
 public CommunityController(ICommunityService communityService)
 {
     _communityService = communityService;
 }
示例#7
0
        protected async Task<LiveLoginResult> TryAuthenticateFromHttpContext(ICommunityService communityService, INotificationService notificationService)
        {
            var svc = new LiveIdAuth();
            var result = await svc.Authenticate();
            if (result.Status == LiveConnectSessionStatus.Connected)
            {
                var client = new LiveConnectClient(result.Session);
                SessionWrapper.Set("LiveConnectClient", client);
                SessionWrapper.Set("LiveConnectResult", result);
                SessionWrapper.Set("LiveAuthSvc", svc);

                var getResult = await client.GetAsync("me");
                var jsonResult = getResult.Result as dynamic;
                var profileDetails = ProfileService.GetProfile(jsonResult.id);
                if (profileDetails == null)
                {
                    profileDetails = new ProfileDetails(jsonResult);
                    // While creating the user, IsSubscribed to be true always.
                    profileDetails.IsSubscribed = true;

                    // When creating the user, by default the user type will be of regular. 
                    profileDetails.UserType = UserTypes.Regular;
                    profileDetails.ID = ProfileService.CreateProfile(profileDetails);

                    // This will used as the default community when user is uploading a new content.
                    // This community will need to have the following details:
                    var communityDetails = new CommunityDetails
                    {
                        CommunityType = CommunityTypes.User, // 1. This community type should be User
                        CreatedByID = profileDetails.ID, // 2. CreatedBy will be the new USER.
                        IsFeatured = false, // 3. This community is not featured.
                        Name = Resources.UserCommunityName, // 4. Name should be NONE.
                        AccessTypeID = (int) AccessType.Private, // 5. Access type should be private.
                        CategoryID = (int) CategoryType.GeneralInterest
                        // 6. Set the category ID of general interest. We need to set the Category ID as it is a foreign key and cannot be null.
                    };

                    // 7. Create the community
                    communityService.CreateCommunity(communityDetails);

                    // Send New user notification.
                    notificationService.NotifyNewEntityRequest(profileDetails,
                        HttpContext.Request.Url.GetServerLink());
                }

                SessionWrapper.Set<long>("CurrentUserID", profileDetails.ID);
                SessionWrapper.Set<string>("CurrentUserProfileName",
                    profileDetails.FirstName + " " + profileDetails.LastName);
                SessionWrapper.Set("ProfileDetails", profileDetails);
                SessionWrapper.Set("AuthenticationToken", result.Session.AuthenticationToken);
            }
            return result;
        }
示例#8
0
 public DefaultController(IProfileService profileService, ICommunityService communityService, INotificationService queueService)
     : base(profileService)
 {
     _communityService    = communityService;
     _notificationService = queueService;
 }
示例#9
0
 public CompositeController(IMeetupService ms, ITalkService ts, ISpeakerService ss, IFriendService fs, IVenueService vs, ICommunityService cs)
 {
     _meetupService    = ms;
     _talkService      = ts;
     _speakerService   = ss;
     _friendService    = fs;
     _venueService     = vs;
     _communityService = cs;
 }
示例#10
0
 public EmailServerAPIController(ICommunityService communityService, IOptions <MemberAPIOptions> options, IOptions <EmailServerOptions> emailServerOptions, IHostingEnvironment hostingEnvironment)
     : base(communityService, options)
 {
     this.hostingEnvironment = hostingEnvironment;
     emailServerSetting      = emailServerOptions.Value;
 }
示例#11
0
 public PartialJSSDKConfigViewComponent(IOptions <WechatOptions> wechatOptions, ICommunityService communityService, ILoggerFactory loggerFactory)
 {
     _logger            = loggerFactory.CreateLogger <PartialJSSDKConfigViewComponent>();
     _communityService  = communityService;
     this.wechatOptions = wechatOptions.Value;
 }
示例#12
0
 public DeleteCommunityHandler(ICommunityService communityService, IBlobService blobService)
 {
     _communityService = communityService;
     _blobService      = blobService;
 }
示例#13
0
 public BannerConfigurationAPIController(ICommunityService communityService
                                         , ShopDbContext db, IMapper mapper)
 {
     this._db     = db;
     this._mapper = mapper;
 }
示例#14
0
 public CommunityController(ICommunityService communityService, IMapper mapper)
 {
     _communityService = communityService;
     _mapper           = mapper;
 }
 public CommunityController(
     ICommunityService communityService)
 {
     this.discordService = communityService;
 }
示例#16
0
 public InsertCommunityShould()
 {
     communityRepository = new CommunityRepositoryMock();
     communityService    = new CommunityService(communityRepository.Object);
 }
示例#17
0
 public RobotMessageSetController(ICommunityService communityService, IOptions <MemberAPIOptions> options, MemberDbContext memberDb, ILoggerFactory loggerFactory)
     : base(communityService, options, memberDb)
 {
     _logger = loggerFactory.CreateLogger <RobotMessageSetController>();
 }
示例#18
0
 /// <summary>
 /// Initializes a new instance of the ContentController class.
 /// </summary>
 /// <param name="contentService">Instance of Content Service</param>
 /// <param name="profileService">Instance of profile Service</param>
 /// <param name="communityService"></param>
 /// <param name="queueService"></param>
 public ResourcesController(IContentService contentService, IProfileService profileService, ICommunityService communityService, INotificationService queueService)
     : base(profileService)
 {
     _contentService      = contentService;
     _notificationService = queueService;
     _profileService      = profileService;
     _communityService    = communityService;
 }
 public GetCommunityEntityHandler(ICommunityService communityService)
 {
     _communityService = communityService;
 }
示例#20
0
 public Communities(ILogger <Communities> log,
                    ICommunityService communityService)
 {
     this.log = log;
     this.communityService = communityService;
 }
 /// <summary>
 /// Initializes a new instance of the EntityController class.
 /// </summary>
 /// <param name="entityService">Instance of Entity Service</param>
 /// <param name="profileService">Instance of profile Service</param>
 public EntityController(IEntityService entityService, IProfileService profileService, ICommunityService communityService, INotificationService notificationService)
     : base(profileService)
 {
     _entityService       = entityService;
     _notificationService = notificationService;
     _communityService    = communityService;
 }
示例#22
0
 public UpdateCommunityImageHandler(ICommunityService communityService, IBlobService blobService)
 {
     _communityService = communityService;
     _blobService      = blobService;
 }
示例#23
0
 public CommunityController(ICommunityService CommunityService, ILog <CommunityController> logger, IMapper mapper) : base(logger)
 {
     _CommunityService = CommunityService;
     _mapper           = mapper;
 }
示例#24
0
 public CommunitiesController(ICommunityService communityService, AbstractValidator <CommunityCriteriaModel> criteriaValidator)
 {
     _communityService  = communityService;
     _criteriaValidator = criteriaValidator;
 }
示例#25
0
 public HomeController(ICommunityService communityService, IPostService postService, ICommentService commentService)
 {
     _communityService = communityService;
     _postService      = postService;
     _commentService   = commentService;
 }
示例#26
0
 public AddModeratorHandler(ICommunityService communityService)
 {
     _communityService = communityService;
 }
示例#27
0
 public CommunityControllerBase(ICommunityService communityService, IOptions <MemberAPIOptions> options, MemberDbContext memberDb)
 {
     _communityService = communityService;
     _options          = _options = options.Value;
     this.memberDb     = memberDb;
 }
示例#28
0
 /// <summary>
 /// Initializes a new instance of the SitemapController class.
 /// </summary>
 /// <param name="communityService">Instance of community Service</param>
 /// <param name="contentService">Instance of content Service</param>
 /// <param name="profileService">Instance of profile Service</param>
 public SitemapController(ICommunityService communityService, IContentService contentService, IProfileService profileService)
     : base(profileService)
 {
     _communityService = communityService;
     _contentService   = contentService;
 }