private void GenericLoader_ProcessRecord(GenericLoader g, int index, IRecordLoader r, ShapeUtilities.BaseShapeRecord shape) { // catchall to avoid unnecessary processrecord event handlers in implementations. // this should really just be all of them really. // however fips calculation may not allow this in a few record types. // ... and just in case there is a usecase where we're loading a state supplied dbf WITHOUT a shapefile. if (r is IHasShape) { IHasShape rec = (IHasShape)r; rec.Shape = shape; } }
public IColoredShape CreateColoredShapeMixin(IHasShape shape, IHasColor color) { var options = new ProxyGenerationOptions(); options.AddMixinInstance(shape); options.AddMixinInstance(color); var generator = new ProxyGenerator(); var proxy = generator.CreateClassProxy(typeof(object), new[] { typeof(IColoredShape) }, options) as IColoredShape; return proxy; }