ArcFM Engine Developer Guide
BaseExtObject.cs

Resource Center Home

Validation Rule Developer Sample (VB.NET)

BaseExtObject.cs

Copy Code
// ========================================================================
// Copyright © 2005 Miner and Miner, a Telvent company 
// All rights reserved.
// ========================================================================
//
// Original author: Rich Ruh
// $Author: Richr $
// $Workfile: BaseExtObject.cs $
// $Date: 5/24/05 4:52p $
// $Revision: 2 $

using System;
using stdole;
using Miner.Interop;
using System.Runtime.InteropServices;
namespace Miner.Samples.VBNetBaseClasses
{
 /// <summary>
 /// Inherit from this class to implement the IMMExtObject interface in Visual Basic.NET.
 /// </summary>
 /// The ArcFM Solution contains an interface, IMMExtObject, that is not compatible with VB.NET.
 /// This interface is used to write custom validation rules.  Unfortunately, if we changed the 
 /// interface to allow VB.NET support, it would break COM compatiblity on all existing custom
 /// validation rules written in Visual Basic.  This, in turn, would require all of our 
 /// customers to completely reconfigure their ArcFM Properties information in all of their
 /// databases!
 /// Instead of that unpalatable option, we include this C# class.
 [ComVisible(true)]
 public abstract class BaseExtObject : IMMExtObject
 {
  protected BaseExtObject()
  {
  }
  #region IMMExtObject members
  public virtual stdole.IPictureDisp Bitmap
  {
   get 
   { 
    return null;
   }
  }
  public bool get_Enabled(ref object pvarValues)
  {
   return IsEnabled(pvarValues);
  }
  abstract public string Name
  {
   get;
  }
  #endregion
  abstract public bool IsEnabled(object varValues);
 }
}

 

 

 

 


Send Comment to ArcFMdocumentation@schneider-electric.com