Пример #1
0
        /// <summary>
        /// handle the special case where we need the owning class
        /// this is only possible if srcClassName is has a unique owner.
        /// find the first class that owns the given 'classId' and the given fieldName.
        /// </summary>
        /// <param name="cache"></param>
        /// <param name="ownedClassName"></param>
        /// <param name="nextFieldName"></param>
        /// <returns></returns>
        private static uint GetClassOwningClassAndFieldName(FdoCache cache, string ownedClassName, string nextFieldName)
        {
            uint clsidDst   = 0;
            uint clsidOwned = cache.MetaDataCacheAccessor.GetClassId(ownedClassName);

            foreach (ClassAndPropInfo cpi in cache.GetFieldsOwningClass(clsidOwned))
            {
                if (ClassHasField(cache, cache.GetClassName(cpi.sourceClsid), nextFieldName))
                {
                    clsidDst = cpi.sourceClsid;
                    break;
                }
            }
            return(clsidDst);
        }
Пример #2
0
		/// <summary>
		/// handle the special case where we need the owning class
		/// this is only possible if srcClassName is has a unique owner.
		/// find the first class that owns the given 'classId' and the given fieldName.
		/// </summary>
		/// <param name="cache"></param>
		/// <param name="ownedClassName"></param>
		/// <param name="nextFieldName"></param>
		/// <returns></returns>
		private static uint GetClassOwningClassAndFieldName(FdoCache cache, string ownedClassName, string nextFieldName)
		{
			uint clsidDst = 0;
			uint clsidOwned = cache.MetaDataCacheAccessor.GetClassId(ownedClassName);
			foreach (ClassAndPropInfo cpi in cache.GetFieldsOwningClass(clsidOwned))
			{
				if (ClassHasField(cache, cache.GetClassName(cpi.sourceClsid), nextFieldName))
				{
					clsidDst = cpi.sourceClsid;
					break;
				}
			}
			return clsidDst;
		}