当前位置: 首页>>代码示例>>C#>>正文


C# IXmpMeta.DoesPropertyExist方法代码示例

本文整理汇总了C#中IXmpMeta.DoesPropertyExist方法的典型用法代码示例。如果您正苦于以下问题:C# IXmpMeta.DoesPropertyExist方法的具体用法?C# IXmpMeta.DoesPropertyExist怎么用?C# IXmpMeta.DoesPropertyExist使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IXmpMeta的用法示例。


在下文中一共展示了IXmpMeta.DoesPropertyExist方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CoverExistingProperties

        /**
         * Test doesPropertyExist, deleteProperty, and related methods.
         * @param meta a predefined <code>XmpMeta</code> object.
         */
        private static void CoverExistingProperties(IXmpMeta meta)
        {
            writeMajorLabel ("Test doesPropertyExist, deleteProperty, and related methods");

            printXmpMeta (meta, "XMP object");

            log.WriteLine("doesPropertyExist ns1:Prop =    " + meta.DoesPropertyExist(TestData.NS1, "Prop"));
            log.WriteLine("doesPropertyExist ns1:Struct =    " + meta.DoesPropertyExist(TestData.NS1, "ns1:Struct"));
            log.WriteLine("doesArrayItemExist ns1:Bag[2] =    " + meta.DoesArrayItemExist(TestData.NS1, "Bag", 2));
            log.WriteLine("doesArrayItemExist ns1:Seq[last()] =    "
                    + meta.DoesArrayItemExist(TestData.NS1, "ns1:Seq", XmpConstants.ArrayLastItem));
            log.WriteLine("doesStructFieldExist ns1:Struct/ns2:Field1 =    "
                    + meta.DoesStructFieldExist(TestData.NS1, "Struct", TestData.NS2, "Field1"));
            log.WriteLine("doesQualifierExist ns1:QualProp1/?ns2:Qual1 =    "
                    + meta.DoesQualifierExist(TestData.NS1, "QualProp1", TestData.NS2, "Qual1"));
            log.WriteLine("doesQualifierExist ns1:QualProp2/?xml:lang =    "
                    + meta.DoesQualifierExist(TestData.NS1, "QualProp2", XmpConstants.NsXml, "lang"));
            log.WriteLine();
            log.WriteLine("doesPropertyExist (namespace is null) =    "
                    + meta.DoesPropertyExist(null, "ns1:Bag"));
            log.WriteLine("doesArrayItemExist (namespace is null) =    "
                    + meta.DoesArrayItemExist(null, "ns1:Bag", XmpConstants.ArrayLastItem));
            log.WriteLine("doesQualifierExist ns:Bogus (namespace not existing) =    "
                    + meta.DoesPropertyExist("ns:bogus/", "Bogus"));
            log.WriteLine("doesPropertyExist ns1:Bogus =    " + meta.DoesPropertyExist(TestData.NS1, "Bogus"));
            log.WriteLine("doesArrayItemExist ns1:Bag[99] =    " + meta.DoesArrayItemExist(TestData.NS1, "Bag", 99));
            log.WriteLine("doesStructFieldExist ns1:Struct/ns2:Bogus =    "
                    + meta.DoesStructFieldExist(TestData.NS1, "Struct", TestData.NS2, "Bogus"));
            log.WriteLine("doesQualifierExist ns1:Prop/?ns2:Bogus =    "
                    + meta.DoesQualifierExist(TestData.NS1, "Prop", TestData.NS2, "Bogus"));
        }
开发者ID:ashbook,项目名称:xmp-core-dotnet,代码行数:35,代码来源:XMPCoreCoverage.cs


注:本文中的IXmpMeta.DoesPropertyExist方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。