Microsoft.Azure.Commands.Resources.Models.ActiveDirectory.ActiveDirectoryClient.ValidateKeyCredential C# (CSharp) Method

ValidateKeyCredential() private method

private ValidateKeyCredential ( Microsoft.Azure.Graph.RBAC.Models.KeyCredential credential ) : void
credential Microsoft.Azure.Graph.RBAC.Models.KeyCredential
return void
        private void ValidateKeyCredential(KeyCredential credential)
        {
            if (credential == null || string.IsNullOrEmpty(credential.KeyId) || string.IsNullOrEmpty(credential.Value) ||
                string.IsNullOrEmpty(credential.Type) || string.IsNullOrEmpty(credential.Usage) || credential.StartDate == null || credential.EndDate == null)
            {
                throw new InvalidOperationException(ProjectResources.KeyCredentialNotValid);
            }
        }