예제 #1
0
        public static Attachment ToAttachment(this SystemIntent intent)
        {
            switch (intent)
            {
            case CarouselIntent carouselIntent:
                return(SharedAttachmentHelper.CreateAttachment(carouselIntent, GoogleAttachmentContentTypes.CarouselIntent));

            case ListIntent listIntent:
                return(SharedAttachmentHelper.CreateAttachment(listIntent, GoogleAttachmentContentTypes.ListIntent));

            case ConfirmationIntent confirmationIntent:
                return(SharedAttachmentHelper.CreateAttachment(confirmationIntent, GoogleAttachmentContentTypes.ConfirmationIntent));

            case DateTimeIntent dateTimeIntent:
                return(SharedAttachmentHelper.CreateAttachment(dateTimeIntent, GoogleAttachmentContentTypes.DateTimeIntent));

            case PermissionsIntent permissionsIntent:
                return(SharedAttachmentHelper.CreateAttachment(permissionsIntent, GoogleAttachmentContentTypes.PermissionsIntent));

            case PlaceLocationIntent placeLocationIntent:
                return(SharedAttachmentHelper.CreateAttachment(placeLocationIntent, GoogleAttachmentContentTypes.PlaceLocationIntent));

            case NewSurfaceIntent newSurfaceIntent:
                return(SharedAttachmentHelper.CreateAttachment(newSurfaceIntent, GoogleAttachmentContentTypes.NewSurfaceIntent));

            default:
                return(null);
            }
        }
예제 #2
0
        public static Attachment ToAttachment(this ResponseItem responseItem)
        {
            switch (responseItem)
            {
            case TableCard tableCard:
                return(SharedAttachmentHelper.CreateAttachment(tableCard, GoogleAttachmentContentTypes.TableCard));

            case MediaResponse mediaResponse:
                return(SharedAttachmentHelper.CreateAttachment(mediaResponse, GoogleAttachmentContentTypes.MediaResponse));

            case BasicCard basicCard:
                return(SharedAttachmentHelper.CreateAttachment(basicCard, GoogleAttachmentContentTypes.BasicCard));

            case BrowsingCarousel browsingCarousel:
                return(SharedAttachmentHelper.CreateAttachment(browsingCarousel, GoogleAttachmentContentTypes.BrowsingCarousel));

            default:
                return(null);
            }
        }
예제 #3
0
        public static Attachment ToAttachment(this Suggestion responseItem)
        {
            switch (responseItem)
            {
            case OpenUrlActionSuggestion openUrlSuggestedAction:
                return(SharedAttachmentHelper.CreateAttachment(openUrlSuggestedAction, GoogleAttachmentContentTypes.OpenUrlActionSuggestion));

            case DialActionSuggestion dialSuggestedAction:
                return(SharedAttachmentHelper.CreateAttachment(dialSuggestedAction, GoogleAttachmentContentTypes.DialActionSuggestion));

            case LiveAgentRequestSuggestion liveAgentRequestSuggestion:
                return(SharedAttachmentHelper.CreateAttachment(liveAgentRequestSuggestion, GoogleAttachmentContentTypes.LiveAgentRequestSuggestion));

            case AuthenticationRequestSuggestion authenticationRequestSuggestion:
                return(SharedAttachmentHelper.CreateAttachment(authenticationRequestSuggestion, GoogleAttachmentContentTypes.AuthenticationRequestSuggestion));

            default:
                return(null);
            }
        }
        public static Attachment ToAttachment(this ContentItem responseItem)
        {
            switch (responseItem)
            {
            case TableContentItem table:
                return(SharedAttachmentHelper.CreateAttachment(table, ActionsSdkAttachmentContentTypes.Table));

            case MediaContentItem media:
                return(SharedAttachmentHelper.CreateAttachment(media, ActionsSdkAttachmentContentTypes.Media));

            case CardContentItem card:
                return(SharedAttachmentHelper.CreateAttachment(card, ActionsSdkAttachmentContentTypes.Card));

            case ListContentItem list:
                return(SharedAttachmentHelper.CreateAttachment(list, ActionsSdkAttachmentContentTypes.List));

            case CollectionContentItem collection:
                return(SharedAttachmentHelper.CreateAttachment(collection, ActionsSdkAttachmentContentTypes.Collection));

            default:
                return(null);
            }
        }
예제 #5
0
 public static Attachment ToAttachment(this ICard card)
 {
     return(SharedAttachmentHelper.CreateAttachment(card, AlexaAttachmentContentTypes.Card));
 }
예제 #6
0
 public static Attachment ToAttachment(this IDirective directive)
 {
     return(SharedAttachmentHelper.CreateAttachment(directive, AlexaAttachmentContentTypes.Directive));
 }
예제 #7
0
 public static Attachment ToAttachment(this Image image)
 {
     return(SharedAttachmentHelper.CreateAttachment(image, GoogleAttachmentContentTypes.Image));
 }
예제 #8
0
 public static Attachment ToAttachment(this RichCardContent richCardContent)
 {
     return(SharedAttachmentHelper.CreateAttachment(richCardContent, GoogleAttachmentContentTypes.RichCard));
 }