-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Communication] - Documentation - Update docs #730
[Communication] - Documentation - Update docs #730
Conversation
*/ | ||
internal class AutoRefreshTokenCredential: CommunicationTokenCredentialProviding { | ||
private let accessTokenCache: ThreadSafeRefreshableAccessTokenCache | ||
|
||
/** | ||
Creates a `CommunicationTokenCredential` that automatically refreshes the token using the provided `tokenRefresher`. | ||
Creates a `CommunicationTokenCredential` that automatically refreshes | ||
the token using the provided `tokenRefresher`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we break this into 2 lines?
@@ -60,10 +62,12 @@ internal class AutoRefreshTokenCredential: CommunicationTokenCredentialProviding | |||
} | |||
|
|||
/** | |||
Retrieve an access token from the cache, or from the `tokenRefresher` if the token is not in the cache or is expired. | |||
Retrieve an access token from the cache, or from the `tokenRefresher` | |||
if the token is not in the cache or is expired. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same line?
|
||
/** | ||
Creates a new instance of CommunicationAccessToken using the provided `token` | ||
and `expiresOn`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same line as above?
@@ -27,7 +27,9 @@ | |||
import Foundation | |||
|
|||
/** | |||
Common Communication Identifier protocol for all Azure Communication Services. All Communication Identifiers conform to this protocol. | |||
Common Communication Identifier protocol for all | |||
Azure Communication Services. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and seems like '. All Communication Identifiers conform to this protocol.' is removed.
- Parameter userId: Id of the Microsoft Teams user. If the user isn't anonymous, the id is the AAD object id of the user. | ||
- Parameter isAnonymous: Set this to true if the user is anonymous, for example when joining a meeting with a share link. | ||
- Parameter userId: Id of the Microsoft Teams user. If the user isn't anonymous, | ||
the id is the AAD object id of the user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting this in separate lines make them harder to read
- Parameter userId: Id of the Microsoft Teams user. If the user isn't anonymous, | ||
the id is the AAD object id of the user. | ||
- Parameter isAnonymous: Set this to true if the user is anonymous, | ||
for example when joining a meeting with a share link. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting this in separate lines make them harder to read
In general, in some places, breakin the text into 2 lines make the comment harder to read. |
Yes I did that on purpose to fix warnings. There was a bunch of warnings the linter was complaining about. |
I guess I don't understand why linter was complaining about. Since the line was not that long originally. |
Just double checking, but yes the liner was complaining that the character limit is 120 and in some cases we were just a little bit over (124 characters) or very over (240 characters) so the goal was to just clean these up |
Is it possible to change the text to shorter so that they can be in same line? e.g. |
|
||
- Parameter completionHandler: Closure that accepts an optional `AccessToken` or optional `Error` as parameters. | ||
`AccessToken` returns a token and an expiry date if applicable. `Error` returns `nil` if the current token can be returned. | ||
`AccessToken` returns a token and an expiry date if applicable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is an extra space between 'returns' and 'a'
And in the Chat generated code, there is |
And in the Chat generated code, there is |
@@ -1,2 +1,5 @@ | |||
disabled_rules: # rule identifiers to exclude from running | |||
- large_tuple | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tjprescott @sacheu making a new addition to swiftlint line length rule to ignore comments.
sdk/communication/AzureCommunication/Source/Authentication/AutoRefreshTokenCredential.swift
Outdated
Show resolved
Hide resolved
sdk/communication/AzureCommunication/Source/Authentication/AutoRefreshTokenCredential.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I think some changes can be reverted now.
No description provided.