예제 #1
0
        int IMMNotificationClient.OnDefaultDeviceChanged(DataFlow flow, Role role, string id)
        {
            if (DefaultDeviceChanged != null)
                DefaultDeviceChanged(this, new DefaultDeviceChangedEventArgs(id, flow, role));

            return (int)HResult.S_OK;
        }
        public static OrganizationUser OrganizationUserAdd(int organizationId, int userId, Role role)
        {
            var organizationUser = OrganizationUser.NewOrganizationUser(organizationId, userId);

            organizationUser.RoleId = (int)role;

            organizationUser = OrganizationUserRepository.OrganizationUserSave(organizationUser);

            return organizationUser;
        }
        public static ProjectUser ProjectUserAdd(int projectId, int userId, Role role)
        {
            var projectUser = ProjectUser.NewProjectUser(projectId, userId);

            projectUser.RoleId = (int)role;

            projectUser = ProjectUserRepository.ProjectUserSave(projectUser);

            return projectUser;
        }
        internal static OrganizationUser OrganizationUserAdd(int organizationId, int userId, Role role, bool ignoreAuthorization)
        {
            var organizationUser = OrganizationUser.NewOrganizationUser(organizationId, userId);

            organizationUser.RoleId = (int)role;

            if (ignoreAuthorization)
            {
                organizationUser = OrganizationUserRepository.OrganizationUserInsert(organizationUser);
            }
            else
            {
                organizationUser = OrganizationUserRepository.OrganizationUserSave(organizationUser);
            }

            return organizationUser;
        }
        internal static ProjectUser ProjectUserAdd(int projectId, int userId, Role role, bool ignoreAuthorization)
        {
            var projectUser = ProjectUser.NewProjectUser(projectId, userId);

            projectUser.RoleId = (int)role;

            if (ignoreAuthorization)
            {
                projectUser = ProjectUserRepository.ProjectUserInsert(projectUser);
            }
            else
            {
                projectUser = ProjectUserRepository.ProjectUserSave(projectUser);
            }

            return projectUser;
        }
예제 #6
0
        /// <summary>
        /// The OnDefaultDeviceChanged method notifies the client that the default audio endpoint
        /// device for a particular device role has changed.
        /// </summary>
        /// <param name="dataFlow">The data-flow direction of the endpoint device.</param>
        /// <param name="role">The device role of the audio endpoint device.</param>
        /// <param name="deviceId">The device id that identifies the audio endpoint device.</param>
        /// <returns>HRESULT</returns>
        void IMMNotificationClient.OnDefaultDeviceChanged(DataFlow dataFlow, Role role, string deviceId)
        {
            if (DefaultDeviceChanged != null)
                DefaultDeviceChanged(this, new DefaultDeviceChangedEventArgs(deviceId, dataFlow, role));

            //return (int) HResult.S_OK;
        }
예제 #7
0
        /// <summary>
        /// The OnDefaultDeviceChanged method notifies the client that the default audio endpoint
        /// device for a particular device role has changed.
        /// </summary>
        /// <param name="dataFlow">The data-flow direction of the endpoint device.</param>
        /// <param name="role">The device role of the audio endpoint device.</param>
        /// <param name="deviceId">The device id that identifies the audio endpoint device.</param>
        /// <returns>HRESULT</returns>
        void IMMNotificationClient.OnDefaultDeviceChanged(DataFlow dataFlow, Role role, string deviceId)
        {
            EventHandler<DefaultDeviceChangedEventArgs> handler = this.DefaultDeviceChanged;
            if (handler != null)
                handler(this, new DefaultDeviceChangedEventArgs(deviceId, dataFlow, role));

            //return (int) HResult.S_OK;
        }