Exemple #1
0
		public void VisitField(FieldDefinition field)
		{			
			if (m_disposable && !field.IsStatic)
			{
				if (field.IsOwnedBy(m_type))
				{
					m_ownedFields.Add(field);
					
					TypeDefinition type = Cache.FindType(field.FieldType);
					if (type != null && type.TypeOrBaseImplements("System.IDisposable", Cache))
					{
						Log.DebugLine(this, "{0} is disposable", field.Name);
						m_disposableFields.Add(field.ToString());
					}
				}
				
				if (!m_hasNativeFields && field.FieldType.IsNative())
				{
					m_hasNativeFields = true;
				}
			}
		}