如何在GoogleDrive提取请求中发送多个Mime类型

时间:2017-05-31 08:43:07

标签: ios

在这里它是最后一个所以如何在一个

发送以下
public interface IGettable
{
    int GetSomething (Criteria crit);
}

public class Criteria
{
    public CriteriaType type {get; set;};
    public int a {get; set;};
    public int b {get; set;};
    ...

    public static Criteria ClassOneCriteria(int a, int b)
    {
        return new Criteria
        {
            type = CriteriaType.ClassOneCriteria, 
            a = a,
            b = b
        }
    }
    ...
}

public enum CriteriaType
{
    ClassOneCriteria,
    ClassTwoCriteria
}

public class ClassOne : IGettable
{
    public int GetSomething (Criteria crit) 
    { 
        if (crit.type != CriteriaType.ClassOneCriteria)
            throw new Exception("Invalid criteria type for Class One");
        ...
    }
}

1 个答案:

答案 0 :(得分:2)

您可以使用or在单个GTLRDriveQuery_FilesList

中包含多个mime类型

query.q = @"(mimeType = 'audio/mp3' or mimeType = 'audio/mpeg3')";