public Client(int clientid, string clientname, ClientTypes clienttype, Guid guid) { Id = clientid; ClientName = clientname; ClientType = clienttype; ClientGuid = guid; }
// 3 public static T GetUserInfo <T>(ClientTypes provider, string accessToken, string tokenType = null) where T : class, new() { var client = GetClient(provider); return(client.GetUserInfo <T>(accessToken, tokenType)); }
public Clients(ClientTypes businessPartnerType) { ClientViewModel.Errors = 0; InitializeComponent(); Messenger.Default.Send <ClientTypes>(businessPartnerType); Messenger.Reset(); }
private async void SaveNewClient() { _CurrentClient.ClientType = ClientTypes.Where(C => C.Id == _CurrentClient.ClientTypeId).FirstOrDefault(); await _service.AddClient(_CurrentClient); Navigate(); }
// 1 public static string RequestAuthenticationTokenUrl(ClientTypes provider, string returnUrl) { var client = GetClient(provider); var url = client.GetAccessCodeUrl(OAuth2Client.AuthenticationResponseType.Token, returnUrl, null, new Dictionary <string, string>()); return(url); }
public static IVersionControlSystem GetClient(ClientTypes type) { switch (type) { case ClientTypes.TortoiseSVN: return(TortoiseSVNWrapper.Instance); } return(null); }
public Client(int clientid, string clientname, ClientTypes clienttype, Guid guid, byte[] timestamp) { Guard.Against.NullOrEmpty(Enum.GetName(typeof(ClientTypes), clienttype), nameof(ClientTypes)); Id = clientid; ClientName = clientname; ClientType = clienttype; ClientGuid = guid; Timestamp = timestamp; }
public static ClientBase Create(ClientTypes type, ClientAuthorition authorition) { switch (type) { case ClientTypes.SSH: return(new SSHClient(authorition)); default: throw new NotImplementedException(); } }
public IClient CreateFactory(ClientTypes type, IExceptionService exceptionService) { switch (type) { case ClientTypes.SMTP: return(new SmtpServiceClient(exceptionService)); default: return(null); } }
/// <summary> /// This method contains the core implementation for generating the GeneratedCode /// instance. /// </summary> /// <remarks> /// This method decorates every type found in codeNamespace with a CodeTypeMemberExtension. /// And then it sends each type through series of ITypeFilters to figure out whether the type /// is a service contract, service type, client type, message contract or data contract. /// </remarks> private void ParseAndFilterCodeNamespace() { ITypeFilter dataContractTypeFilter = new DataContractTypeFilter(); ITypeFilter messageContractTypeFilter = new MessageContractTypeFilter(); ITypeFilter serviceContractTypeFilter = new ServiceContractTypeFilter(); ITypeFilter clientTypeTypeFilter = new ClientTypeTypeFilter(); ITypeFilter serviceTypeTypeFilter = new ServiceTypeTypeFilter(); for (int i = 0; i < codeNamespace.Types.Count; i++) { // Take a reference to the current CodeTypeDeclaration. CodeTypeDeclaration ctd = codeNamespace.Types[i]; // Create a new instance of CodeTypeMemberExtension to wrap // the current CodeTypeDeclaration. CodeTypeExtension typeExtension = new CodeTypeExtension(ctd); // Also wrap the inner CodeTypeMember(s) ExtendTypeMembers(typeExtension); // Here we execute the type filters in the highest to lowest probability order. if (dataContractTypeFilter.IsMatching(typeExtension)) { typeExtension.Kind = CodeTypeKind.DataContract; DataContracts.Add(typeExtension); continue; } if (messageContractTypeFilter.IsMatching(typeExtension)) { typeExtension.Kind = CodeTypeKind.MessageContract; MessageContracts.Add(typeExtension); continue; } if (serviceContractTypeFilter.IsMatching(typeExtension)) { typeExtension.Kind = CodeTypeKind.ServiceContract; ServiceContracts.Add(typeExtension); continue; } if (clientTypeTypeFilter.IsMatching(typeExtension)) { typeExtension.Kind = CodeTypeKind.ClientType; ClientTypes.Add(typeExtension); continue; } if (serviceTypeTypeFilter.IsMatching(typeExtension)) { typeExtension.Kind = CodeTypeKind.ServiceType; ServiceTypes.Add(typeExtension); continue; } UnfilteredTypes.Add(typeExtension); } }
public static ClientInstance Create(ClientTypes ofClientType) { IClientInstance clientObject = null; switch (ofClientType) { case ClientInstance.ClientTypes.ClientTypeA: clientObject = new ClientClassA() as ClientInstance; default: break; } return(clientObject); }
public override bool Unpack(NetIncomingMessage message) { try { ClientType = (ClientTypes)message.ReadByte(); Name = message.ReadString(); Credentials = message.ReadString(); } catch (Exception) { return(false); } return(true); }
private FakeDataBase() { PublicClientType = new ClientType() { Id = 1, Wording = ClientTypeName.Public }; ConfidentialClientType = new ClientType() { Id = 2, Wording = ClientTypeName.Confidential }; ClientTypes.Add(PublicClientType); ClientTypes.Add(ConfidentialClientType); }
public static void Register(ClientTypes type, ClientConfig config) { switch (type) { case ClientTypes.Facebook: Clients.Add(new FacebookClient(config)); break; case ClientTypes.Deezer: Clients.Add(new DeezerClient(config)); break; case ClientTypes.Dropbox: Clients.Add(new DropboxClient(config)); break; case ClientTypes.Google: Clients.Add(new GoogleClient(config)); break; case ClientTypes.Instagram: Clients.Add(new InstagramClient(config)); break; case ClientTypes.Linkedin: Clients.Add(new LinkedInClient(config)); break; case ClientTypes.PayPal: Clients.Add(new PayPalClient(config)); break; case ClientTypes.Spotify: Clients.Add(new SpotifyClient(config)); break; case ClientTypes.WindowsLive: Clients.Add(new WindowsLiveClient(config)); break; case ClientTypes.Yandex: Clients.Add(new YandexClient(config)); break; } }
public static en[] ToSupported(ClientTypes clientType, AdSystemTypes adSystemType, bool isLandscape) { if (clientType == ClientTypes.None) { return(new en[0]); } if (clientType == ClientTypes.Web) { return new en[] { en.InlineRectangle } } ; List <en> items = new List <en>(); if (adSystemType == AdSystemTypes.Banner) { if (isLandscape) { items.Add(en.MobileBannerLandscape); } else { items.Add(en.Banner); } } else if (adSystemType == AdSystemTypes.Interstitial) { if (isLandscape) { items.Add(en.SmartphoneInterstitialLandscape); } else { items.Add(en.SmartphoneInterstitialPortrait); } } return(items.ToArray()); }
public static OAuth2Client GetClient(ClientTypes provider) { var client = Clients.FirstOrDefault(d => d.ProviderName == provider); return(client); }
public void SetGuest() { ClientType = ClientTypes.Guest; }
public void SetHost() { ClientType = ClientTypes.Host; }
//2 public static AuthenticationToken GetAuthenticationToken(ClientTypes provider, string returnUrl, string code) { var client = GetClient(provider); return(client.GetAuthenticationToken(code, returnUrl)); }
public NetworkData(MessageTypes types, string message, ClientTypes clientType) { MessageType = types; Message = message; ClientType = clientType; }
public Customer(ClientTypes clientType, string name) { this.ClientType = clientType; this.Name = name; }
// 2.5 public static AuthenticationToken GetRefreshToken(ClientTypes provider, string refreshToken) { var client = GetClient(provider); return(client.GetRefreshToken(refreshToken)); }
public void SetSystemClientMode() { ClientType = ClientTypes.ServiceClient; }