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


C# IClassMap.GetFullName方法代码示例

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


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

示例1: GetTypeFromClassMap

		public virtual Type GetTypeFromClassMap(IClassMap classMap)
		{
			Type type;
			type = Type.GetType(classMap.GetFullName() + ", " + classMap.GetAssemblyName());
			if (type == null)
			{
				foreach (Assembly asm in m_LoadedAssemblies.Values)
				{
					type = asm.GetType(classMap.GetFullName());
					if (type != null)
					{
						break;
					}
				}
			}
			return type;
		}
开发者ID:Dawn-of-Light,项目名称:Puzzle.NET,代码行数:17,代码来源:AssemblyManager.cs

示例2: LoadObjectsPerObject

 protected virtual void LoadObjectsPerObject(Type type, RefreshBehaviorType refreshBehavior, IList listToFill, IClassMap classMap)
 {
     string directory = GetDirectoryForClass(classMap);
     string className = classMap.GetFullName().ToLower();
     foreach (string fileName in Directory.GetFiles(directory))
     {
         FileInfo file = new FileInfo(fileName);
         if (file.Extension.ToLower() == ".xml")
         {
             if (file.Name.Length > className.Length)
             {
                 if (file.Name.Substring(0, className.Length).ToLower() == className)
                 {
                     string xml = LoadFile(type, fileName);
                     if (xml != "")
                         DeserializeObject(type, listToFill, classMap, xml);
                 }
             }
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:puzzle-svn,代码行数:21,代码来源:DocumentPersistenceEngine.cs

示例3: GetFileNamePerObject

        protected virtual string GetFileNamePerObject(object obj, IClassMap classMap)
        {
            IObjectManager om = this.Context.ObjectManager;

            string directory = GetDirectoryForClass(classMap);

            string fileName = directory + @"\" + classMap.GetFullName() + "." + om.GetObjectIdentity(obj) + ".xml";

            return fileName;
        }
开发者ID:BackupTheBerlios,项目名称:puzzle-svn,代码行数:10,代码来源:DocumentPersistenceEngine.cs

示例4: GetDirectoryForDomain

        protected virtual string GetDirectoryForDomain(IClassMap classMap)
        {
            ISourceMap sourceMap = classMap.GetDocSourceMap();

            if (sourceMap == null)
                throw new MappingException("Can't find Document Source Map for '" + classMap.GetFullName() + "' in the npersist xml mapping file!"); // do not localize

            string directory = sourceMap.DocPath;

            if (!(Directory.Exists(directory)))
                throw new NPersistException("Can't find directory: " + directory); // do not localize

            return directory;
        }
开发者ID:BackupTheBerlios,项目名称:puzzle-svn,代码行数:14,代码来源:DocumentPersistenceEngine.cs

示例5: GetDirectoryForClass

        protected virtual string GetDirectoryForClass(IClassMap classMap)
        {
            ISourceMap sourceMap = classMap.GetDocSourceMap();

            if (sourceMap == null)
                throw new MappingException("Can't find Document Source Map for '" + classMap.GetFullName() + "' in the npersist xml mapping file!"); // do not localize

            string directory = sourceMap.DocPath;

            if (!(Directory.Exists(directory)))
                throw new NPersistException("Can't find directory: " + directory); // do not localize

            directory += @"\" + classMap.GetFullName();

            if (!(Directory.Exists(directory)))
            {
                try
                {
                    Directory.CreateDirectory(directory);
                }
                catch (Exception ex)
                {
                    throw new NPersistException("Could not create directory '" + directory + "': " + ex.Message, ex); // do not localize
                }
            }

            return directory;
        }
开发者ID:BackupTheBerlios,项目名称:puzzle-svn,代码行数:28,代码来源:DocumentPersistenceEngine.cs

示例6: SerializeObject

        protected virtual void SerializeObject(XmlNode xmlObject, object obj, IClassMap classMap, bool creating, bool specifyClass)
        {
            if (specifyClass)
                SetAttributeValue(xmlObject, "class", classMap.GetFullName() );

            foreach (IPropertyMap propertyMap in classMap.GetAllPropertyMaps())
            {
                if (propertyMap.ReferenceType == ReferenceType.None)
                {
                    if (propertyMap.IsCollection)
                    {
                        ;
                    }
                    else
                    {
                        SerializeInlineProperty(xmlObject, obj, classMap, propertyMap, creating);
                    }
                }
                else
                {
                    //if (propertyMap.DocPropertyMapMode == DocPropertyMapMode.Default || propertyMap.DocPropertyMapMode == DocPropertyMapMode.Inline)
                    if (propertyMap.DocPropertyMapMode == DocPropertyMapMode.Inline)
                    {
                        if (propertyMap.IsCollection)
                        {
                            SerializeInlineObjectList(xmlObject, obj, classMap, propertyMap, creating);
                        }
                        else
                        {
                            SerializeInlineObject(xmlObject, obj, classMap, propertyMap, creating);
                        }
                    }
                    else
                    {
                        if (propertyMap.IsCollection)
                        {
                            SerializeInlineReferenceList(xmlObject, obj, classMap, propertyMap, creating);
                        }
                        else
                        {
                            SerializeInlineReference(xmlObject, obj, classMap, propertyMap, creating);
                        }
                    }
                }

            }
        }
开发者ID:BackupTheBerlios,项目名称:puzzle-svn,代码行数:47,代码来源:DocumentPersistenceEngine.cs


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